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

[Ask] Accessing options of a field from another field #760

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello,

I have a custom field extended from Text field. I would want to access the options of a Select field on the same form from my custom text field.

I tried to implement postRender function in my custom field and do a lookup from there (traversing up the data structure using the parent property), but it seems that childrenByPropertyId objects in the data structure are empty at the time when postRender is run.

What would be the best strategy to implement this?