5
votes
Accepted
Adding New Matrix Block via Frontend in Craft 3
After talking to Craft Support (Thanks Oli!), the solution for Craft 3 is...
{{ hiddenInput('fields[vendorLocations][sortOrder][]', 'new:1') }}
{{ hiddenInput('fields[vendorLocations][blocks][new:1][...
2
votes
Delete Entry on Front End Form (Craft CMS 4.x)
Thanks to @Ben and folks on Discord — here is some form code that also works:
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
{{ ...
2
votes
Delete Entry on Front End Form (Craft CMS 4.x)
The delete action has moved to the ElementsController class in Craft 4, specifically:
https://github.com/craftcms/cms/blob/7d3351996c5f9f09ea59c0a712df09fc877b753f/src/controllers/ElementsController....
2
votes
Accepted
Set redirect after submitting password reset form for front-end user accounts
To tell Craft where to redirect the user after successfully submitting the form, you can add a hidden input named redirect.
The best way to do this is by using the redirectInput() Twig function, i.e.
&...
1
vote
Prepopulating image fields - Formie Plugin on Craft 4
So firstly, you can't really populate a File Upload field, because Formie uses a <input type="file"> which according to the HTML spec, you cannot populate.
You can populate the field ...
1
vote
Front end entry form not saving on Craft CMS 4 multisite
Adding the siteId input field to the form as follows should work:
{{ hiddenInput('siteId', currentSite.id) }}
Otherwise, please provide an error message so we can help you figure this out.
1
vote
Accepted
'Request missing required body param' when submitting front end entry form - Craft CMS
You need to add sectionId to your form:
{{ hiddenInput('sectionId', xx) }}
If you have multiple entry types, you can also add typeId to the form:
{{ hiddenInput('typeId', xx) }}
For both examples, ...
1
vote
Working with "money" values
A little late I know, but as noted in my answer here, Money fields have an amount property that (with a little reformatting) you can use to display the value wherever you need it.
Further, if I enter ...
1
vote
Accepted
How can I troubleshoot why a user's initial password is being deleted after a front-end registration? [answer: it was not set in the first place]
When setting the password for the new User model, you should use the newPassword property instead of password, i.e.
$user->newPassword = $userData['password'];
This is due to the User model ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
frontend-form × 85craft3 × 19
users × 10
matrix × 9
frontend × 9
assets × 8
form × 8
registration × 7
craft4 × 6
templating × 5
ajax × 5
tags × 5
upload × 5
entry-form × 5
validation × 4
saveentry × 4
entries × 3
entry × 3
redactor × 3
emails × 3
password × 3
checkboxes × 3
plugin-development × 2
config × 2
datetime × 2