We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [frontend-form]

The frontend-form tag should be used for any question related to forms build on the front-end.

Filter by
Sorted by
Tagged with
8
votes
5answers
2k views

How do you set a user's group on a registration form?

In a registration form with public signup possible, how do you set the user group for a particular form? As a stop-gap I am attempting to use the following code: function init() { craft()->on(...
2
votes
2answers
213 views

Frontend Form - Checkboxes cannot “all” be unchecked

I have a frontend entry form with some checkboxes that is not behaving correctly. If you uncheck all options and save, nothing changes (this is bad). However if you uncheck one item and check another ...
2
votes
1answer
310 views

Date fields saving the wrong date from front-end form

I have a front-end form with two date fields. After upgrading to Craft 3 and implementing what I believe to be all the changes concerning front-end forms in Craft 3 I am experiencing some odd behavior....
2
votes
2answers
618 views

Form for admins to register users from the front end

Is there a way to create a front-end form that would allow a user with appropriate privileges (Register users) to register new users?
2
votes
1answer
348 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
75 views

How to remove a Super Table row on the front end?

Is it possible to remove a Super Table row? I got it to work to add a new row but it would be great if I can remove it later. Thanks for any help! :)
2
votes
1answer
92 views

Sprout Forms - Can't save front end entry edits

This this might be a bug but want to ask here first in case I'm missing something minor. Description Trying to front edit a Sprout Form entry that was created in the front end. I'm using the same ...
2
votes
1answer
138 views

Check for errors (any) on guest entry form (Craft 3)

I have a guest entry form that's working fine. I'm using Craft-supplied code: {% macro errorList(errors) %} {% if errors %} {% for error in errors %} {{ error }}{% if not loop.last %}, {% ...
2
votes
1answer
98 views

How can I use the Courier plugin to notify a user when an entry is enabled?

Moderation scenario: Registered user publishes an entry using a front-end form that sets the entry to disabled. Moderator receives email re new entry and changes status from disabled to enabled in ...
2
votes
1answer
344 views

Front End Editing with Entry From

I need to allow store managers to edit their store. I'm most of the way there and have the title field and a couple of other plain text fields set up. However there isn't any documentation available ...
2
votes
1answer
414 views

How can I validate a Redactor rich text field in a front-end form using the VeeValidate Vue.js plugin?

Scenario I'm using the VeeValidate Vue.js plugin to validate a Craft front-end form that contains a Redactor rich text field. Problem Validation of the rich text field fails because Redactor adds ...
2
votes
1answer
603 views

Write to Craft via Element API

I’d like to use Craft as a headless CMS for my mobile app (via the Element API plugin). However, in addition to reading data, I’d also like to write data back to Craft. It looks like this is ...
2
votes
1answer
147 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 ...
2
votes
1answer
64 views

Non-admins not authorized to create entry via frontend

I'm currently working on a page that should allow registered users to upload an image and save it as an entry in a section called "bildupload", together with some additional fields. Creating/saving ...
2
votes
0answers
24 views

How to protect elements that are being edited during project-config/sync?

Some situations: An editor is editing an entry in the CP while an admin runs project-config/sync. A user starts a front end form to create a new entry before project-config/sync is run, but submits ...
2
votes
0answers
45 views

Retain value from select and checkbox on frontend form after failure

I have a registration form on my frontend and when people click register but the form fails (due to the username already existing for example) I would like to keep all info they entered in the form so ...
1
vote
2answers
490 views

Help with tags input field on a front-end entry form

I need to make a "keywords" field on a front-end entry form that can create tags in the cms (Craft 2). I am fully aware of existing tickets regarding this issue like Brandon Kelly's but they're a ...
1
vote
1answer
675 views

How can I insert images into a Redactor rich text field in a front-end form?

I want to allow registered users to insert (i.e. upload) images into a Redactor rich text field in a front-end form. I dowloaded the Image Manager plugin from Imperavi (https://imperavi.com/redactor/...
1
vote
2answers
121 views

Frontend form to change Craft Commerce user's password?

I'm trying to modify Craft 3's example 'Change password' form to work with a logged in Commerce 2 user, and have copied that code to templates/setpassword.twig. Two problems... (1) The {{ code }} ...
1
vote
1answer
101 views

Edit entry, on the front end, with the entries field

I currently have front-end code working for a user to create an entry, add a title (text input) and also relate entries via the entries field type and checkboxes. All on a front-end application. ...
1
vote
1answer
53 views

How can I get the id of an unverified user on front-end?

I would like to build a send activation email form on front-end, for users who didn't get or accidentaly delete the activation email. I can call the users/send-activation-email action to achieve this,...
1
vote
1answer
179 views

How to rearrange the order of blocks of a single matrix field using a frontend form?

I'm trying to rearrange the matrix block order using a frontend form. If I use JavaScript to change the order of inputs in the DOM will this change the order in the backend after form submission? How ...
1
vote
1answer
100 views

Bad Request POST param “redirect” was invalid

I'm creating a user profile form on the front-end of our website. I've removed all template code and replaced it with the documentation code from the Craft website. I updated the docs code to reflect ...
1
vote
1answer
69 views

Save an entry with tags

I have a project that the user choose a tag (tags are already created) and save the information. I try save a entry which has a tag field, all the stuff saves, but the tags don't. I try search ...
1
vote
1answer
353 views

Get a field's required attribute in frontend form

I am trying to get the required attribute of a field in a frontend form. I know this attribute only makes sense in the context of an entry type. Doing this craft.fields.getFieldByHandle('handle') ...
1
vote
1answer
88 views

Can Craft handle social-esque frontend user interactions?

I've got a potential client I'd like to build a Craft site for, but they have some specific features I'm not quite sure how to handle. Could someone tell me if Craft can handle the following features? ...
1
vote
1answer
20 views

Scan of front end user uploads

I wonder if we have a form allowing file uploads for front end users, does Craft or its plugins have certain feature to scan for virus / malicious content, before saving it? If not, what would be the ...
1
vote
1answer
23 views

How do I show errors for a new front end entry form?

I'm using a front end form so logged-in users can create a new entry ("post") or edit an existing entry. Here's the controller for figuring out whether it's a new or existing entry: {# Get the entry ...
1
vote
1answer
72 views

Front End Dropdown Field from Super Table

I have a single static Super Table Field with some Dropdown Fields. Is it possible to loop through the values instead of hardcoding each one? My hardcoded version works without problems but i think a ...
1
vote
1answer
27 views

How to determine if a user's email has changed

I'm trying to determine if a user has changed their email address via a front-end form. From what I've gleaned, the best way to do this would be by checking the existing record during users....
1
vote
1answer
50 views

How can I fix Image Exception error when uploading image via front-end form while Preparse plugin enabled?

I'm not sure if the issue is with Craft 3, the Preparse plugin, or me, so I'm posting here first. I have a front-end form that includes an Assets field used to upload images. The entry type contains ...
1
vote
1answer
59 views

hashing form fields to prevent tampering

I have a front end form for entry creation. I have a few options I don't want tampered with. The docs for |hash say "Prefixes the given string with a keyed-hash message authentication code (HMAC), for ...
1
vote
1answer
88 views

Plugin development: how can I check if user has the permissions to delete only his own assets?

I have a front-end form where logged users can upload and delete their personal files. These users have the strict minimum permissions required to interact with this form. They can only Create, ...
1
vote
1answer
76 views

How can I set a custom URI for the confirmation link of account email update from a front-end form?

I have a front-end form to update user's email address, like this example: <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} <input type="...
1
vote
1answer
93 views

frontend account edits

I have an account page for all my users, however i'm running into a small issue with being able to update passwords / emails on the frontend. Any advice on how to do this? I read that updating either ...
1
vote
1answer
266 views

Craft 3 front end form file uploads not saving if filename exists?

I have a front end save entry form which users can attach photos too, it all works fine unless a photo with the same filename is saved, in this instance the entry saves but the asset field is just ...
1
vote
1answer
56 views

How to save multiple related entries on the frontend with 1 checkbox?

I have a frontend form and would like to save multiple related entries by checking 1 checkbox. I have this working to save 1 related entry: <input type="checkbox" id="user-type-select-{{ userType|...
1
vote
0answers
62 views

Entries as JSON files?

I work with VUE CLI and I want to build a entry form. My first Idea to bind in the data was props. They work but i can't modify the data (because it's props :D). To correctly integrate the data, my ...
1
vote
0answers
45 views

Non-admins can't create new entries with front-end form (ajax)

I'm hitting an issue where signed-in non-admin users can't create a new entry with a front-end entry form (but can edit existing ones). Everything works except for this single instance: ✓ Admin ...
1
vote
0answers
77 views

Craft 3: Possible to merge checkbox and text values from a frontend form and put into a plaintext Craft field?

Is it possible to submit checkbox array and text values on a front end form into a plaintext Craft field in Craft 3? My solution worked in Craft 2 but it broke in Craft 3 due to some under the hood ...
1
vote
0answers
33 views

Display Stripe card error in Craft 3 front-end entry form template

I have a custom plugin set up to speak to Stripe's API and process a card charge. The code triggers in a craft\elements\Entry::EVENT_AFTER_SAVE event because I want to pass along certain data about ...
1
vote
0answers
130 views

How can I edit multiple entries via multiple front-end forms using Vue.js?

I found this post. However, writing a plugin in currently not an option, and I'd like to do this with Vue.js since I'm already using it for form validation & other stuff. Also, this involves ...
1
vote
0answers
74 views

Rewrite locale urls on nginx, but not for registration links

I'm using this Gist to rewrite the urls on a localized website running on nginx. It's working fine, except for the account activation links. They are localized as well, but they shouldn't. I'm sure ...
1
vote
0answers
117 views

Craft 3 - Resaving Matrix from frontend causing issues (Craft is not defined) [closed]

I’m having an issue with resaving a matrix block on users from a front end form. The problem is that after resaving the block and the page reloading. The styling on the page breaks until reload. When ...
1
vote
0answers
72 views

Front end entry dropdown with null option

I have successfully implemented a front-end form that allows the user to add new "blocks" to a certain matrix field. This matrix field has one text field, two date fields, and one entry field that ...
1
vote
0answers
55 views

Plugins for Tags

Is there any plugin for Tag that will be like: Text field in a front-end entry form where user can add multiple tags. After pressing the save button, the plugin should: check for every tag, whether ...
0
votes
1answer
32 views

Craft 3 Custom Set Password Styles

I've been building frontend pages for non-admin users with layouts matching the rest of the enduser site. For the "Set Password" page, I was able to build the form and set it up via the ...
0
votes
1answer
118 views

Sanitize front-end entry form field

If I'm enabling a user to post to Craft using the front-end entry form, is there a way that I can sanitize the title of a post? I'm looking to apply AP formatting to titles. I know Stephen has a ...
0
votes
0answers
25 views

Can a lightswitch field accept true or false as a posted value?

I have a frontend form that allows users to toggle a lightswitch field. I discovered that the entry does not update correctly when passing true or false with the request, despite my frontend receiving ...
0
votes
0answers
23 views

Add Matrix Blocks to existing Entry with Form without discarding existing Matrix Blocks

When I want to save an new Matrix block with an form to an existing Entry: <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} <input type="hidden" name="action" value="entries/...