Closed petrsiroky closed 4 months ago
In the latest version I added hidden field type, so you can use it.
This code should work:
\October\Rain\Support\Facades\Event::listen('formBuilder.overrideField', function ($field) {
if ($field->name === 'my_hidden') {
$field->default = request()->url();
}
});
You can also use formBuilder.beforeSendMessage
event to override $data sent with form.
This code can be used in page php section or custom plugin boot method.
great, thanks for the quick reply. That should work
Hi, please advice and maybe an idea for a new field. Is there some way to submit a custom variable along with the form using a hidden field or creating a custom field. In the form I need to send the title or slug or url of the page from which the form is sent.
Thank you