nested_form_fields
nested_form_fields copied to clipboard
Dynamically add and remove nested has_many association fields in a Ruby on Rails form
When I use rails-ujs instead of jquery_ujs and try to remove nested fields by remove_nested_fields_link, I get the following error: `TypeError: $.rails.allowAction is not a function`
Is there a way to require this in a webpack instead of using the sprockets asset pipeline?
I can't seem to figure out why, but function that wait on fields-added seem to be executed twice So ``` $(document).on("fields_added.nested_form_fields", function(){ console.log("hi") }); ``` gives two times hi in...
I am using nested_fields_for in a partial page and the partial page is being used twice in the same main page. "add_nested_fields_link" is working fine for the rendered first partial...
As of Rails 5.1, jQuery is no longer needed and Rails UJS is available without any dependencies. It would be great to drop the jQuery dependency and just use plain...
I would like to use nested_fields with auto increment number in a hidden field currently, my code is ``` ``` I want idx = 1 when first field created then...
Hi! I'm trying to no render new object form in each new/edit view, just shows up by clicking in 'Add another item'. How I could do that? Is there any...
Hi! I'm trying to implement the second level of nesting form. but if I add first level form, the second level of add / remove button doesn't work. Model: Model...
Is there an event/function I can call to run AFTER fields_added?
In the code below, ff.object.product.name works but ff.object.sales_order_item and ff.object.delivery doesn't. They all have the same associations in the model. belongs to and has_many, optional: true. If I change to...