Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
I'm trying to create a multiple select field, with the name name = "metrics[]". However, alpaca forms will not eat that name. 👎 It converts the brackets to one underscore so this is the result:
I replaced the brackets with ASCII code in the JSON I'm feeding but that wont do the trick, the underscore is still there. 😠If I changed the name directly in the DOM (after Alpaca generated the form) and submit the form, it goes fine.
So why do I want brackets in the name? Because else Laravel wont accept the multiple select field as an array if the field name doesnt have brackets. So masicly, using the multiple select with laravel wont work since laravel requires a name that alpaca forms wont accept.
I'm trying to create a multiple select field, with the name name = "metrics[]". However, alpaca forms will not eat that name. 👎 It converts the brackets to one underscore so this is the result:
<select id="alpaca41" multiple="multiple" name="metrics_" class="alpaca-control form-control"></select>
And what I want:
<select id="alpaca41" multiple="multiple" name="metrics[]" class="alpaca-control form-control"></select>
I replaced the brackets with ASCII code in the JSON I'm feeding but that wont do the trick, the underscore is still there. 😠If I changed the name directly in the DOM (after Alpaca generated the form) and submit the form, it goes fine.
So why do I want brackets in the name? Because else Laravel wont accept the multiple select field as an array if the field name doesnt have brackets. So masicly, using the multiple select with laravel wont work since laravel requires a name that alpaca forms wont accept.
Sup with the underscore?