laravel-form-builder
laravel-form-builder copied to clipboard
How to customise the atributes of the form?
The question is very simple, but I don't know how to achieve this. I only want add to the form a configurable id, to can select it using javascript or somethin similar.
How to you can modify or set the id of the form? like:
(asume that i loaded the trait)
$form=$this->form(\mi\form::class, {
'method' => 'get',
'url' => 'mi_url',
'attr' => {
'id' => 'userForm',
'onsubmit' => 'scriptname'
}
});
Is possible do something of this style?
¡thanks!
I'm having a similar issue. I need to set an id as well as a few custom data elements.
This was recently introduced https://github.com/kristijanhusak/laravel-form-builder/pull/578