Nate
Joined 12/25/2021
Nate said almost 3 years ago on Building a Questionnaire :
Hi David! I'm wondering what would you suggest doing in the case that I would like to render the same

<%= form.text_field :name, placeholder: 'Answer', class: 'form-control' %>

answer field in the long answer div i.e

  <div data-controller="nested-form" data-dynamic-select-target='long'>
     <%= form.fields_for :answers, Answer.new do |answer| %>
       <%= answer.text_field :name, placeholder: 'Answer', class: 'form-control' %>
      <% end %>
  </div>

I've played with this, but this keeps causing problems since it will submit answer the form everytime with one empty field also. Any suggestions?

Nate said almost 3 years ago on Building a Questionnaire :
I'm having a bit of trouble understanding how can you place anything related to the form under the long target as this will always submit empty data form either of the form since other one of them is just hidden not removed from the DOM.