laravel-form-builder icon indicating copy to clipboard operation
laravel-form-builder copied to clipboard

How to customise the atributes of the form?

Open sanslash332 opened this issue 6 years ago • 2 comments

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!

sanslash332 avatar Oct 01 '18 20:10 sanslash332

I'm having a similar issue. I need to set an id as well as a few custom data elements.

matthewkris avatar Feb 05 '20 14:02 matthewkris

This was recently introduced https://github.com/kristijanhusak/laravel-form-builder/pull/578

kristijanhusak avatar Feb 05 '20 14:02 kristijanhusak