cocoon-gem Questions

5

Solved

I was wondering whether anybody tests fields that were dynamically added by cocoon? It's a great little time saver but all of the fields that are added dynamically have really long numerics added...
Eremite asked 20/4, 2014 at 16:16

4

Solved

Have been using cocoon gem for nested forms in rails 4 & rails 5 apps. Currently, I was updating one of the rails 5.2 app (which is using cocoon gem) to rails 6. As rails 6 is using webpacker...
Yaker asked 17/9, 2019 at 13:3

3

Solved

My partial gets rendered twice instead of only once, as expected. Any thoughts? Here's my Person view <%= simple_nested_form_for(@person) do |f| %> <%= f.error_notification %> <...
Googol asked 23/1, 2013 at 14:24

1

I'm using the cocoon gem on my rails app and I have two nested fields inside a form (categories, subcategories). Initially I'm showing the first one only and the second one is hidden. Each time the...
Syngamy asked 7/3, 2020 at 10:38

1

Solved

According https://github.com/nathanvda/cocoon#link_to_add_association you should be able to pass a function to data-association-insertion-node I have tried this: <%= link_to_add_association 'A...
Farny asked 10/3, 2017 at 2:32

1

I have the same issue as this one But that solution didn't help me. Here are my strong params: def request_params params.require(:request).permit(:name, :address, :phone, :mobile, :type, ...
Hurl asked 23/4, 2015 at 8:27

1

Solved

I normally don't use tables for forms, but when having a nested form (when using nested_form or cocoon gem), is it okay then to put each set of form elements inside a table row? To me, this seems ...
Toronto asked 11/9, 2013 at 7:8

2

Solved

How can we fix the nested_attribute: _result_fields.html.erb so that when a user clicks "Delete" that it actually deletes it? Whereas now clicking it does nothing. <%= f.text_field :result_valu...
Schwarzwald asked 21/6, 2015 at 19:59

2

Solved

I've been using the Cocoon gem to dynamically generate nested fields in rails. I've run into an application where I would like to numerically label the fields generated by cocoon; something like as...
Budbudapest asked 19/1, 2015 at 10:22

2

Solved

I am creating a system that stores cards using Ruby/Rails/HAML - In this case there is a Card class that has many Colours (this is also a class). When creating and editing a card I am using the Coc...
Whimsy asked 17/10, 2012 at 13:0

1

Solved

I would like to set the value of field inside fields_for with Cocoon gem using Jquery. I am using change event on jquery. _form <%= form_for(@invoice) do |f| %> <div class="field"> ...
Cooee asked 12/5, 2014 at 9:26

1

Solved

I have been trying to get some code figured out. I have a form I am trying to use the Wicked and Cocoon gem. Everything works, including the link_to_add_association function. I am rendering a parti...
Kidderminster asked 21/9, 2013 at 14:30

1

Solved

Currently I have a Note model which accepts nested attributes for an Attachments model, which uses Carrierwave. When adding a Note, I have a nested form to allow attaching file to the new Note: Ne...
Keeney asked 8/8, 2013 at 16:36

1

Solved

I currently have a complex form with deep nesting, and I am using the Cocoon gem to dynamically add sections as required (e.g. if a user wants to add another vehicle to the sale form). Code looks l...
Posada asked 3/10, 2012 at 13:17

1

Solved

I'm having issues validating with cocoon and the number of fields a model is allowed. Using cocoon, rails3, I have a nested form whereby my locations have many links. I need to restrict the number...
Clemmie asked 9/4, 2012 at 22:6
1

© 2022 - 2024 — McMap. All rights reserved.