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
1
vote
1answer
18 views

How to save an entry using AJAX on a frontend Form [ for registered users]

I'm having a follow button on the front end it allows you to save an entry to a specific section (type: channel) and it's all working great, but i need to achieve this with AJAX This is my Form {% if ...
1
vote
1answer
31 views

Do i need a [ Craft PRO ] to create accounts/User management for my LMS website?

I'm still a new to Craft and trying to make an LMS website when i started to search about the [ Sign up/Sign in ] i read that the official docs : https://craftcms.com/knowledge-base/front-end-user-...
0
votes
0answers
16 views

Error uploading to asset field from front end form

I'm getting an error when uploading to an asset field from a front end form during entry creation. SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "...
1
vote
0answers
38 views

Redirect to frontend login form after receiving email verification mail from CMS?

I'm working on a site with public registration and a manual approval flow for new users. The following settings for user accounts are active: Verify email addresses, Allow public registration, Suspend ...
0
votes
0answers
17 views

Problems with saving mutliple matrix blocks with Base64-encoded data on their asset fields

My problem When saving two or more matrix blocks via a front end form, the Base64-encoded data does not upload an asset for each blocks. The first block gets the last blocks image data, while the rest ...
0
votes
0answers
20 views

How to populate Sprout Address field from frontend form

I'm using the Sprout Fields plugin but having difficulty figuring out how to save to a Sprout Address field from a front end form. The sprout address field is one of a few custom fields in the form. ...
1
vote
1answer
48 views

Specify FolderId When Uploading a File on the Frontend

In a front-end form where I am uploading a file, I need to specify a specific subfolder. I can't do it in the cp dynamic field for reasons so I was hoping to use a hidden field to set the folderId. ...
2
votes
2answers
52 views

Craft Commerce: Frontend Validation on Address Fields

Yes I know there is this post But how do you do address validation in the frontend of Commerce 3? The problem is the way Billing Address & Shipping Address are set up. Billing Address are the same ...
1
vote
1answer
17 views

Front End Entry Form - Proper Syntax for Custom Fields

I'm working on a front-end entry form with custom text input fields. From the Entry Form knowledgebase docs, I read "Any custom field handles must be provided in a fields[] array like body is ...
1
vote
1answer
37 views

Best Approach to all unique groups of users to edit unique groups of entries in 1 channel

I've got a request to let front end users edit entries in 1 section, but only if the entries are related to their user group - so different users will have ability edit a different subset of entries ...
0
votes
0answers
30 views

File Upload Validation in a Front End form

Good Evening. I have a front end form that allows users to upload up to 4 images to an asset field, however the file chooser allows for more than 4. This causing an issue with any further updates at ...
1
vote
1answer
46 views

Set asset uploader from frontend entry form

Now that Craft keeps track of which user uploaded an asset, I'm wondering if it's possible to set this information when an asset is uploaded via a frontend entry form. I have a form that includes an ...
1
vote
1answer
194 views

adding a block of matrix field from a front end entry form

I am trying to add a form to the frontend in which a registered user will be able to create and publish new block in a matrix field. I have read the documentation about it but am still failing ...
1
vote
2answers
71 views

How to upload asset element on its own, not into an asset field (frontend form)

I have read this resource about uploading a file to an asset field on an entry, but I believe I need to create the asset on its own because the asset has 2 custom fields associated with it that I want ...
2
votes
1answer
117 views

Front End Entry Form - File/asset field not saving when ajax submitted

I have a front end entry form which submits and saves fine when not using ajax. But when i do submit via ajax the text fields etc save fine but the file/assets field will not. I have stripped it right ...
1
vote
2answers
95 views

Frontend Form Search Users based on Tags

Context: I'm trying to build a search form that will filter users based on Name, Skills and School. Users who have any of the search criteria should appear in my results. Name Is a fuzzy keyword ...
2
votes
0answers
271 views

How to Upload Multiple Assets Using Frontend Form

I'm trying to create a more interactive experience to upload moultiple images on a frontend entry form. Things I have done: I have implemented the code here: https://docs.craftcms.com/v3/dev/...
1
vote
1answer
50 views

Front end form with Matrix won't add more than one row

I have Notification entry with sendTo field and nViewed matrix: - viewedBy = Users field, limit of 1 - viewedDateTime = Plain Text User's don't see whole front end form, just a 'Mark as Read' link. ...
1
vote
1answer
34 views

Updating a matrix row in an existing entry using a frontend form

I am trying to update a specific row in a matrix field using a frontend form, I created them using another form with each row following the [new1], [new2] etc. naming format, but I can't seem to get ...
1
vote
0answers
111 views

What's left to troubleshoot this quirky "Unable to verify your data submission" behavior?

I have a frontend login form that sends a request to Craft's own actions/users/login action. I've used this same process in another project and it works there, but not here, and I can't figure out ...
0
votes
0answers
77 views

Frontend Form for editing entries HTTP Exception

I took the example form of the craft CMS Entry Form Documentation page and tried to use it on a test site. However i always get a HttpException after submitting the Frontend Form. Here's the Stack ...
2
votes
0answers
34 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
1answer
87 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
0answers
224 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
1answer
396 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 ...
0
votes
0answers
50 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/...
1
vote
1answer
244 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
0answers
134 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 ...
2
votes
1answer
167 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! :)
1
vote
0answers
122 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
64 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
1answer
40 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
2answers
432 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
167 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
182 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
0answers
286 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 ...
0
votes
2answers
182 views

Does Craft save dates in the locale format?

I have a website with multiple locales (English, Dutch, French, German and Spanish). I'm saving dates on a front-end form through Ajax, but it seems that Craft saves the dates in the locales' format, ...
1
vote
1answer
494 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
0answers
103 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
1answer
238 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
116 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="...
2
votes
1answer
156 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
177 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 ...
0
votes
1answer
42 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 ...
1
vote
1answer
64 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,...
2
votes
1answer
293 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
820 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
650 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....
1
vote
0answers
133 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
1answer
313 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 ...