nimdevelopment / formbuilder
Php form precompiler
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:libbrary
This package is auto-updated.
Last update: 2025-06-17 03:59:44 UTC
README
A php form precompiler
Make a form from within PHP code. Example:
FormBuilder::open_form(['action' => '/post', 'method' => 'post'])
->formgroup('open')
->row('open')
->colmd(12)
->label(['for' => 'cars'])
->text('Select a car:')
->label()
->select(['name' => 'cars'])
->option(['value' => 'Volvo'])->text('Volvo')->close()
->option(['value' => 'Volkswagen'])->text('Volkswagen')->close()
->option(['value' => 'Bmw'])->text('Bmw')->close()
->option(['value' => 'Mercedes'])->text('Mercedes')->close()
->select()
->colmd()
->row()
->formgroup()
->formgroup('open')
->label(['for' => 'message'])->text('Tell us about your favorite car:')->close()
->textarea(['name' => 'message', 'rows' => '5', 'cols' => '20'])
->text('askjdfh asdfhu sadhf isduhf iushdaf iuhsa ifudhas iuhf isuhf iuashdf usahf iauhads iufh.')
->textarea()
->formgroup()
->button(['type' => 'submit', 'class' => 'btn btn-primary'])->text('Submit')->close();
FormBuilder::close_form();
Add the pre-compiled form in your blade view by inserting this snippet: @include('formbuilder::insert')