Questions tagged [form]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
401 views

Craft Commerce — Billing / Shipping Address validation / required Fields

As default Craft has only First Name and Last Name as required. Is it possible to set more as this two fields as required fields? And is it also possible to set custom Fields as required too?
1
vote
1answer
2k views

How to call Controller in Module?

I'm very new to craft and I'm having trouble finding an answer to my question (I've scoured the questions on here - but the only answers appear to be for plugins). Basically, I want to submit a form ...
2
votes
1answer
135 views

Add Dynamic Elements In Forms

I'm needing to add a dynamically added dropdown input field for my form, as is commonly done with javascript. How would this be possible? In other words, there may be more than 1 dropdown desired by ...
1
vote
0answers
146 views

Front End New Entry Form

I am trying to create a form that allows users to rate a restaurant (which is another section) by creating a "userRatings" section entry. userRatings has three fields: a dropdown field called ratings, ...
0
votes
1answer
230 views

Serialization of 'Closure' is not allowed

I created a form on the frontend that allows users to upload their profile photos: <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} <input ...
1
vote
1answer
284 views

How to reference an entry field in a guest user form?

I'm new to Craft. I've been trying to wrap my head around how to design the concept of Events and Event Registrations. Currently I have both Events and Event Registrations as their own Sections as ...
1
vote
1answer
176 views

Pass variable in Twig tag

My template has this line that I want to update from a field in craft: {% set form = craft.formBuilder2.getFormByHandle('schoolTrip') %} I want 'schoolTrip' to be replaceable by a plain text field ...
1
vote
0answers
171 views

Can't dynamically add value to hidden input Sprout field

I'm trying to add a hidden input with Sprout forms and Sprout fields but I can't dynamically add a value to the input attribute. I have a custom form template in craft/templates/_forms/field.html in ...
1
vote
1answer
33 views

Product category not being added to the order model. Craft Commerce

I've created a form in which to specify a category for a product on the product entry page. I can't seem to add the category that the customer selects to the order model. I've checked the orders in ...
1
vote
2answers
226 views

Sprout Form Date/Time field not displaying

I'm working on an inherited site where I have a sprout form and am adding additional fields. I have added a date/time field to the form with the settings in this screenshot. In my template where all ...
1
vote
1answer
381 views

Missing required param: card[exp_month] on Charge 2

I created fields using Charge 2 plugin and after creating a form I getting an error Missing required param: card[exp_month]. <div class=""> <div class="grp-form"> <...
2
votes
2answers
205 views

Craft Commerce: make address phone telephone field required without JavaScript

Because I used a similar address model to the one supplied in the Craft Commerce templates, which essentially uses the same form partials for both address and billing, and also hides and shows the ...
2
votes
1answer
172 views

User Profile Form Not Saving Data

I'm having some trouble saving custom user fields via a front-end form as described here. All the other forms on the site that use the same method save the data correctly. I'm able to pull in the user ...
1
vote
1answer
72 views

Send to a friend that sends an email to a defined email of the users choosing

using the contactForm plugin, I want to make a contact form, that sends to an email address of the users choosing, not the email set up in the admin. Does anyone know the simplest way of doing this?
1
vote
1answer
45 views

How to read form response URL variables in template?

I have a basic login form that's talking to a separate server that's out of my immediate control. I'm trying to read the responses it's sending in the URL within the Craft template. For example... ...
2
votes
1answer
132 views

Address form not redirecting to payment form in Craft Commerce

I've had this working before but with the billing address as well. Do both the billing and shipping addresses need to be filled out in the same form for this to work? I get this error when I click the ...
2
votes
1answer
64 views

Using a Sprout Form within a Sprout Form?

I'm creating a website where members have a form of questions to fill in each day. But within this form is a another set of questions that are always the same each day, but will have different answers ...
1
vote
1answer
257 views

Enabling CSRF Protection for Mailchimp Subscribe plugin and other forms

I'm using the MailChimp Subscribe for Craft plugin to embed several subscription forms on a website I'm building. The following code appears via my master _layout.html file: <form action="" ...
2
votes
1answer
1k views

How do I search craft.entries with multiple parameters?

I'm filtering entries based off a searchbar with multiple parameters, and I'm building up an entries filter based off of them. Everything works great except for having more than one .search functions. ...
0
votes
1answer
284 views

Refresh Craft for loop with form parameters

Recently new to Craft and Twig although I have used Expression Engine in the past. I am looking for a way to update a for loop that is pulling entries from a defined category based on the current ...
1
vote
2answers
191 views

Additional Fields aren't sent within Contact Form email

I am using Contact Form v1.9.0 with latest version of Craft. I've additional fields to the form so that the inputted values appear in the email message. However, the only field being sent within the ...
1
vote
2answers
506 views

Generate pdf with form submission data

I'm using amforms for a client and need to create a user confirmation email that has a pdf attached containing the submitted form data, like a receipt. After a little google searching, I believe I'd ...
1
vote
1answer
64 views

Save field inputs upon submission of front end form for reuse in new form?

Is there a straightforward way of saving the input of two form fields when a form is submitted from the front end and reusing it in another form? One field is a select2 field (Users) which can ...
1
vote
2answers
247 views

front end date field format doesn't work? fields[dateField][date]

There are a number of answers on this forum for getting a front-end form to have a DateTime field that splits date and time into separate fields; It's not working for me. If I strip back to absolute ...
2
votes
1answer
213 views

Front end Entry form with validation error support?

The official example ( https://craftcms.com/docs/templating/entry-form ) seems to assume that the form itself is not already on a page which is an Entry. Dropping this form into a template that has an ...
2
votes
1answer
380 views

How to build a multipage form using Freeform?

I've been trying to search for some instructions on how to build a multipage form using Freeform in Craft CMS. The official documentation is very light on the subject; https://solspace.com/craft/...
1
vote
1answer
798 views

Frontend form with relation to an entry

I have a field called "assetId" from Entry "A" with Field Type "Entries" and Source "B". How can I build a form so that a relation between these two entries will be established. In the craft backend ...
2
votes
1answer
241 views

Redirect on front end Password Redirect not working

Craft 2.6.2963 I've got a password reset form on the front end which works correctly sending the email. However it doesn't redirect on submit, unless you are loggedin. redirect works if logged in, ...
3
votes
2answers
2k views

Integrate Google reCAPTCHA into Contact Form plugin

So I just recently plugged in pixelandtonic/ContactForm plugin into my website and I realized I got about 3 spam emails straight into my inbox on the first day it was up. Is there a way to integrate ...
2
votes
1answer
1k views

Customizing front-end login/logout redirects

I have "manage" link that redirects to domain.com/login. "login" is custom front-end page that after logging in redirects to homepage. After logging in when I click "manage" again the domain.com/login ...
2
votes
1answer
123 views

User make assets subfolder in the frontend

I have a standard user profile form. But now I would like that the user can upload images in new subfolder and make own subfolder. Is there any solution or a plugin for this?
2
votes
1answer
386 views

AJAX Front-end User Registration Form not displaying macro errorList

I have a user registration form on my Front-end which is submitted with Ajax which works fine. The only problem is that if I have any errors, like an already in use username they wont be displayed. ...
2
votes
1answer
375 views

Creating a editable table with Element Select in column

First of all, I'm starting in Craft in general so I'm having a hard time with things that might be basic. I want to create a editable table with a Element Select in a column. Like: I already have ...
2
votes
1answer
141 views

Can I atttach uploaded file in A&M Forms to notification email

I have form created with A&M Forms plugin where the user can upload a file. I would like to attach the file to the notification email itself. Is this possible? How?
2
votes
1answer
942 views

Select dropdown not going to option url

I have a pop up box on a siteplan image that includes a select dropdown to let people select the apartment that they want. However, I can't get the it to go to the url when it's selected. So need some ...
2
votes
1answer
53 views

onBeforeSaveUser event does not fire if basic user fields do not validate

I have additional fields I check for in the onBeforeSaveUser event and add the errors to the errors array. The problem is my code doesnt even run if they miss the main fields or if the email is ...
1
vote
1answer
382 views

How to implement radiobuttons field on frontend registration form?

I want to add a question to a frontend registration form. The radiobuttons are just 'Yes' or 'No'. I've created a radiobutton field and added that to users > fields. If I add this option to the form,...
2
votes
1answer
426 views

How to modify entry with a users field in the front-end?

Is it possible to modify an field of an entry within the front-end? Something like this with an action URL: <a href="{{actionUrl('save/entry', {userfield:user.id}) }}">add user to userfield of ...
3
votes
1answer
210 views

How does Craft automatically wrap `fields[]` around name attributes?

When you use a form macro to generate an input in the CP, you'll end up with something like this... <input type="text" id="fields-myField" name="fields[myField]"> Oddly, it looks like "myField"...
2
votes
1answer
580 views

Correct way of showing errors when editing profile via front-end form?

I've been looking at the following resources: https://craftcms.com/docs/templating/user-profile-form Allow user to change or delete their photo for their profile from the front end Front end edit: ...
1
vote
1answer
174 views

Registration form issue

I have a registration form that looks like this: <form method="post" accept-charset="UTF-8"> {{ getCsrfInput() }} <input type="hidden" name="action" value="users/saveUser"> ...
2
votes
1answer
653 views

Bad Request with weird params

I just installed Craft fresh, there's almost nothing in my DB as I'm just beginning to develop a plugin. All I want is to save a new entry from the frontend of my website. I've done this before in ...
2
votes
1answer
388 views

Recommendations for Form Integrations with Salesforce?

I'm new to Craft and really loving it so far. I'd like to use something like Sprout Forms or Freeform (are there others worth looking at?) but I really need to be able to submit any data to Salesforce....
1
vote
1answer
419 views

frontend form action: save as draft or publish

in my frontend entry form I have a "save as draft" submit button. The current action for this form is the following, which saves the entry submitted through the form as a draft (status: disabled): &...
0
votes
0answers
63 views

Form Error Causes Page to Reload Without an Entry ID

I have a section (single) that uses a template that shows information from the entry and includes a form (uses entry form) that posts to a different section (event registration info). All is fine as ...
1
vote
0answers
87 views

How to set other fields as required in Craft Commerce checkout process? [duplicate]

I'm using Craft Commerce with the default checkout template. At the step of completing addresses, only First Name, Last Name & Country are required fields by default. As I'll sell non-digital ...
2
votes
1answer
236 views

Front End Asset Management - Upload New Photos without Deleting/Overriding Existing

I'm trying to create a front end system where users can create and manage listings with multiple photos. Everything saves as a draft until approved by an admin. In the front end edit page, uploading ...
1
vote
1answer
225 views

Entry Form doesn't save the entry and goes to 404 page

I have a frontend Entry Form that will not save an entry and goes to a 404 page. Basically i have this: <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" class="add-a-...
1
vote
1answer
453 views

Set status 'pending' on Guest Entry form

I'm using P&T's Guest Entries plugin along with my front end entry forms. All working fine except I want front end entries submitted with status 'pending'. Thought this would be pretty ...
1
vote
1answer
372 views

Solspace Freeform: loop over all form errors

I can only find the following method in the documentation (https://solspace.com/craft/freeform/docs/form/#templates) form.hasErrors Is there an array available with all the error messages combined? ...