gitana / alpaca

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.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

schema type integer ignored in Alpaca.Fields.ListField.getValue() #701

Open icitti opened 5 years ago

icitti commented 5 years ago

Hi, I'm new to Alpaca but really loving it - we have a LOT of forms of ahead of us and all of them talk to a rest api with schemas available, etc. Alpaca JS really fits hand-in-glove with our needs.

The getValue() method for Alpaca.Fields.ListField only evaluates schema.type as string, number, boolean, array, or object.

If the schema type is set to "integer", getValue() will return null.

Can support for integer be added to upcoming revision? I can try to send a pull request, just haven't found my around git and github yet.

Anyway, thanks for considering.