adamwathan / bootforms

Rapid form generation with Bootstrap 3 and Laravel.
MIT License
417 stars 103 forks source link

Form select element #26

Closed superpikar closed 10 years ago

superpikar commented 10 years ago

Is Bootform doesn't support <select> element? I'm trying as follows, but didn't work

{{ BootForm::select('Arc Types', array('bundle'=>'Rounded', 'linear'=>'Linear')) }}

showing error

Next exception 'ErrorException' with message 'Illegal offset type in isset or empty

adamwathan commented 10 years ago

Hey man, I thought it was in the docs but it's not so I'll add it, but the syntax for select is as follows:

BootForm::select('Label', 'fieldName')->options(['bundle' => 'Rounded', 'linear' => 'Linear'])

BootForms is a Bootstrap-specific wrapper around my more generic form package which has pretty thorough documentation here:

https://github.com/adamwathan/form