« Back
Sammy.FormBuilder select ( keypath, options, attributes )
creates a select element for keypath with the option elements
specified by an array in options. If options is an array of arrays,
the first element in each subarray becomes the text of the option and the
second becomes the value.
Example
var options = [
['Small', 's'],
['Medium', 'm'],
['Large', 'l']
];
form.select('size', options);
//=> <select name='item[size]'><option value='s'>Small</option> ...
comments powered by Disqus