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][...
cherrykoda's user avatar
  • 656
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"> {{ ...
Adrian's user avatar
  • 407
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....
Ben Croker's user avatar
  • 7,136
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. &...
Mats Mikkel Rummelhoff's user avatar
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 ...
crawf's user avatar
  • 3,507
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.
Ben Croker's user avatar
  • 7,136
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, ...
Oli's user avatar
  • 7,350
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 ...
Tom Davies's user avatar
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 ...
Mats Mikkel Rummelhoff's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible