Features
- setAction()
- AlpineJS
- CSRF + ProCache
- Entries
- Hooks
- HTML Helper
- HTMX
- RockForms.js
- Live Validation
- RockLoaders
- Custom Markup
- MultiStepForm
- Multiple Forms
- Opt-In / Confirmation
- Processing Form Submissions
- Form Renderers
- Spam Protection
- Translations
- File Uploads
- Form Validation
Requirements
PHP>=8.0RockMigrations>=4.3.0- setAction()
setAction()
By default RockForms will submit forms with method POST
to the same site they where rendered on.
If you want to change that behaviour you can set a custom action target as follows:
public function buildForm() {
$form = $this;
$form->setAction("/contact-success/");
// ...
}
Note that this approach might not work when using HTMX to submit your forms. In that case you can disable that feature:
This can help you improve the UX of your forms. See here for an interesting discussion in the forum. 🤓