nested_form_fields icon indicating copy to clipboard operation
nested_form_fields copied to clipboard

No render new object form in each new/edit view

Open angelapr opened this issue 7 years ago • 1 comments

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 configuration to do that? Here's my code: `

            .row
              .col-md-12
                = ff.nested_fields_for :questions do |fa|
                  .container-question-blocks-surveys
                    .remove-link= fa.remove_nested_fields_link "Remove option"
                    .md-form.select-form.question_type
                      .....
                      = fa.nested_fields_for :question_options do |option|
                        = option.text_field :content
                        .......
                        .remove-link-option= option.remove_nested_fields_link "Remove option"
                      = fa.add_nested_fields_link :question_options, "Add option"

                = ff.add_nested_fields_link :questions, "Add question", class: "btn btn-primary"

angelapr avatar Aug 30 '18 10:08 angelapr

There is no option for that. One way would be to use javascript to trigger the remove link straight after displaying the form.

ncri avatar Sep 05 '18 18:09 ncri