nested_form_fields icon indicating copy to clipboard operation
nested_form_fields copied to clipboard

Need to start an event/function after fields_added.nested_form_fields

Open bassman88 opened this issue 7 years ago • 3 comments

Is there an event/function I can call to run AFTER fields_added?

bassman88 avatar Nov 13 '17 16:11 bassman88

It's in the readme: fields_added

ncri avatar Nov 13 '17 17:11 ncri

@ncri I need to be able to call an event after the one below: $(document).on("fields_added.nested_form_fields", function(){ $('.increment').last().text('<%= @less_per_unit %>'); calc_total(); });

bassman88 avatar Nov 13 '17 17:11 bassman88

Oh, i was reading "after fields added". ;-) Well, the fields_added event is the last thing happening when adding nested fields, so you can simply put the code behind the other code you have in the on callback? Why would it need to be later?

ncri avatar Nov 13 '17 17:11 ncri