How to add fields programaticaly?
USvER opened this issue · 3 comments
USvER commented
I want to add nested form fields using javascript and populate it with data... How to do this?
I need to generate dom from blueprint, and then using jquery replace some values... But i don't know how...
drakmail commented
See source around https://github.com/ryanb/nested_form/blob/master/vendor/assets/javascripts/jquery_nested_form.js#L2 , maybe this help.
svensson-david commented
There's a good starting point added to the wiki for anyone looking for this
https://github.com/ryanb/nested_form/wiki/How-To:-Add-fields-with-pre-defined-values
USvER commented
@svensson-david yeah, that is what i did... Added event listener and change value from there...