Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [form]

The tag has no usage guidance.

18
votes
3answers
2k views

Allow user to change or delete their photo for their profile from the front end

How can I allow a user to change or delete their photo for their profile from the front end? I currently have a form setup for the user to edit their profile but I want to load their current photo (...
17
votes
1answer
5k views

How do you create a front-end form for users to submit content?

I'd like to create a form for users to load events (that I will moderate and publish). How do I do this?
9
votes
1answer
1k views

Can I accept file uploads using the Craft Guest Entries plugin?

Can I accept file uploads using the Craft Guest Entries plugin? Using input type="file" doesn't seem to be working.
9
votes
1answer
2k views

How do you delete assets from a frontend form?

I am creating a proof of concept for a client in Craft where the client's customers can manage projects from the frontend of a Craft install. I have a frontend form working correctly for creating a ...
8
votes
4answers
3k views

Email Notification When Post Submitted

Is it possible for a user group to be notified by email when a post is submitted using either the backend or a form on the front end?
7
votes
1answer
495 views

Unsure whether to use Sprout Forms or code forms regularly

I was wondering if anyone who has experience using Sprout Forms might be able to steer me in the right direction on whether I'm better off using the Sprout Forms plugin or coding the forms ...
7
votes
1answer
1k views

Can guests upload files to assets in an entry form?

I'm using Craft Guest Entries plugin and the Entry Form technique elsewhere on my site. I'm currently trying to add a file upload to it. The entry is publishing but nothing is making it to assets. ...
6
votes
2answers
3k views

Does anyone have a working example of frontend form with multiple file upload, drag & drop etc?

I'm trying to create a frontend entry form for a logged in user, with a field to upload multiple assets to that entry. I've tried using the Jquery FileUpload plugin, but can't seem to get that ...
6
votes
1answer
710 views

Delete items from frontend with ajax

I'm trying to delete items through the frontend with ajax. It's working now but want to be sure if this is a safe method: $(".delete-file").click(function(){ var data = { entryId: $(this)....
6
votes
1answer
1k views

How do you delete entries from a frontend form?

Part 2 of a 3 part question: I am creating a proof of concept for a client in Craft where the client's customers can manage projects from the frontend of a Craft install. I have a frontend form ...
6
votes
1answer
217 views

Form input not being disabled

In the plugin I'm creating I've got a form that has inputs which are set as disabled if they are overridden in a conifg file. The problem that is occurring is that disabled class is added to the ...
5
votes
2answers
822 views

Front end edit: entry doesn’t get saved

I am trying to make entries editable from the front end and pretty much follwed the docs. When i visit my edit view, the entry-from is filled with their respective values but unfortunately no changes ...
5
votes
1answer
426 views

Forms are triggering CSRF Protection. Why would CSRF Protection trigger false positives?

We've enabled CSRF Protection on a site. When we do, it sometimes works, but most of the time it gets tripped and triggers false positives and doesn't allow our forms to be submitted. Things we've ...
5
votes
2answers
493 views

P/T ContactForm Retrieving Custom fields Value after submitting form

I'm trying to retrieve custom fields value after submitting a form. Trying to access the custom fields through the message element after the form is submitted always throws an error that the custom ...
5
votes
1answer
1k views

Can you set the redirect path for system forgot password form?

At the moment when a user clicks on the forgot password link in an email the following happens: User is redirected to the forgot password page. User enters their new password. User is redirected to ...
5
votes
1answer
1k views

Ajax front-end user registration form - not returning JSON

I have a user registration form on the front-end of a site that is working well as a standard form, but when I try to use ajax submission, I'm getting an HTML response rather than JSON. Here's the ...
5
votes
1answer
996 views

Getting server-side feedback when submitting forms with jQuery Form plugin

I've got a few simple front-end forms that users can use to update their profiles. I'm using the combo of the jQuery Validate and Form plugins to handle validation and submission. I can successfully ...
4
votes
1answer
2k views

Is it possible to change a user's password in the front-end?

Is it currently possible to change a user's password in for example the profile edit form? I'm currently using the forgot password approach for this.
4
votes
1answer
1k views

How do I enable redactor rich text editor in a front-end form?

I have a front-end form for registered users to submit entries, however I'd like to have a WYSIWYG editor like the dashboard. How would I get redactor working with this form? My form: <form ...
4
votes
1answer
126 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"...
4
votes
2answers
705 views

How do set multiple entry relations using checkboxes on a front end form?

I want to set up a form on the front-end of a site to allow logged in users to choose items from a list which represent entries in a channel using checkboxes, then save those entries as relations to ...
4
votes
1answer
944 views

Edit a table field type from the front end

Similar to this question, I'm trying to make a table field type editable from a front end form. When I update from the CP, the changes are reflected on the front end, but the following code doesn't ...
4
votes
1answer
822 views

How to add a tags-field to an entry form?

I use the following entry form (front-end): https://craftcms.com/docs/templating/entry-form How can I add a tags-field to this entry form?
4
votes
1answer
298 views

Simple search using a single category in Craft CMS

I am relatively new to Craft and I am having a little trouble understanding how to build a simple search which will allow me to have dropdown of my categories which will return the selected category ...
4
votes
1answer
548 views

MailChimp & Sprout Forms

I am using Sprout Forms for my contact forms and I want to integrate the MailChimp subscribe plugin but it looks like the MC Subscribe plugin needs to have name="mcvars[FIRSTNAME]" on the input fields ...
3
votes
3answers
1k views

User registration: How do implement “Confirm password” and “Confirm email”?

I've got a user registration form on my site, using the code from Craft's documentation. How can I get the form working so it asks the user to enter their email address and password twice? Can Craft ...
3
votes
2answers
682 views

Populating tables and matrix fields using GuestEntries

Is it possible to populate a Matrix Field, Table and Lightbox using the GuestEntries plugin from an HTML form? I'm trying to build an RSVP form, and am not having a lot of luck with different field ...
3
votes
2answers
2k views

What is the best way to append CSRF token without using a form?

I have built a plugin that simply makes requests to a 3rd party API. I am calling my plugin action via ajax. I don't have a form on this page currently. Here is what I am using, but I am getting the ...
3
votes
4answers
2k views

Robust Form Plugins for Craft?

We're doing a rebrand and web overhaul for a Christian camp, retreat, and conference center. A big part of the site is a registration system where people can register for an event, fill out a detailed ...
3
votes
2answers
573 views

How do I extend another plugin?

I'd like to know if it's possible to extend another plugin with my own. I'm currently using the Sprout Forms plugin to create a contact form on our website, and I would like to extend that so when a ...
3
votes
3answers
962 views

How do I save a front-end form as a specific Entry Type?

I have a few different forms on my site for different kinds of enquiries, each represented by an Entry Type with different fields in a single Enquiries channel. How can I get the entries/saveEntry ...
3
votes
2answers
901 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 ...
3
votes
1answer
172 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 ...
3
votes
2answers
628 views

Encrypt ID on front-end and decrypt on back-end

I have a front-end form that posts through the ID of a particular element/entry to a back-end controller. Is there any way to encrypt/hash that ID on the front-end, so the plain ID number is not ...
3
votes
1answer
61 views

Is it possible to POST to an action if the system is offline?

There are easier ways to do this for sure, but... I have the Mailchimp Subscribe plugin installed to build our email list etc... and it works perfectly! However, we are now building a "Coming Soon" ...
3
votes
2answers
679 views

_includes/forms documentation on field types

I'm trying to find any documentation on the usable forms from {% import "_includes/forms" as forms %} so for example I have no idea what the difference is between elementSelect and select or how I ...
3
votes
1answer
100 views

Where do I begin troubleshooting a Form in Craft that is redirecting to /login on iPad and iPhone?

I'm not sure how to ask this question. I have a form. It works just fine on desktops. However when the form is submitted on iPhone or iPad it never makes it to my controller and resolves to the URL /...
3
votes
3answers
828 views

Create date/time from string via form

I'm using the wonderful A&M form plugin to create a form on my site, and I have 3 dropdowns for the user's birthday: month, day, and year. Currently, I have it set up so that when the form ...
3
votes
2answers
239 views

Auto-populate login form when accessed via client intranet

My client has a private Craft site only accessible to their employees. To access the site they all use the same username and password on a front-end login form. They are now wanting to link to this ...
3
votes
1answer
373 views

Is it possible to cache a faceted search form?

I have created a search form which allows user to search multiple categories groups and multiple categories within those groups. So I have Type [] Category 1 [x] Category 2 [] Category 3 ... ...
3
votes
1answer
800 views

How do I retain form input values after submitting error-ridden form containing matrix field inputs

I'm looking for a way to keep matrix inputs populated with their original value after submitting a form containing errors. I'm already aware of the method of doing this for general inputs as shown ...
3
votes
1answer
223 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. ...
3
votes
1answer
66 views

How do I prevent empty table rows from being created when a front end form is submitted?

I have a front end form which contains text fields that are connected to a Craft table field. The issue I have is that if I do not fill out the text input fields on the front end it is still creating ...
3
votes
1answer
96 views

Registration Form

I want to create a registration form in my website like Name, email and comments. Once the end user filled the details, I would like to allow him to download a PDF. Could any one please let me know ...
3
votes
1answer
250 views

Front-end form, creating a tag

Similar to the question asked here: How to add a tags-field to an entry form? I am trying to create an entry form that can create tags. I'm using http://selectize.github.io/selectize.js/ for the ...
3
votes
2answers
708 views

How can I stop a duplicate entry being created & provide feedback?

I have a booking form on my site, which when submitted creates a new entry which has two fields: an Entries field which links to a single User, and another Entries field which links to a single Event. ...
3
votes
1answer
87 views

Sprout Form redirect after submit not working correctly

All my forms on sprout form won't use the redirect they get assigned via the Form builder. Whenever a form is succesfully submited it redirects to my homepage instead of my thank-you page. <form ...
3
votes
1answer
46 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 ...
3
votes
1answer
245 views

Plugin: Linking elementSelectField to own plugin models

I'd like to have an elementSelectField in my plugin. The goal is to select a Company which is defined by my plugin Model. So when clicked, it'll display a list of companies in the Dialog box and you ...
3
votes
1answer
551 views

User Registration Form error message customisation

Where can I edit the error messages for the user registration form e.g for {% if account is defined %} {{ _self.errorList(account.getErrors('email')) }} {% endif %} I want to change this ...