Link_to_add, data: { target: } not working for a bootstrap modal pop up
Genhain opened this issue · 1 comments
Genhain commented
Fairly self explanatory in the title, but here is the code im running into the issue
.form-group
= f.label :secondary_emails, t("activerecord.attributes.attendee.secondary_emails"), class: 'col-lg-2 control-label'
.col-lg-10
= f.fields_for :secondary_emails do |email_field|
#secondary-emails
.form-group
.col-lg-3
= email_field.text_field :email, placeholder: t("attendees.placeholder.secondary_emails"), class: 'form-control input-lg', required: true
.col-lg-1
= email_field.link_to_remove do
.btn.btn-danger.btn-lg
i.fa.fa-trash-o
.form-group
.col-lg-6
= f.link_to_add t("attendees.add"), :secondary_emails, class: 'btn btn-success', data: { target: '#secondary-emails' } do
So clicking on the button nothing happens and nothing is embedded unfortunately.
Also using slim, rails and such if that helps diagnose the issue.
Genhain commented
Nevermind, the issue was there was too copies of the window open and it was being added to the wrong window