The label text was always in English, and it wasn't associated with any
input field.
The `SecureRandom` part is a quick hack so we don't get duplicate IDs.
Using "your_answer_#{question.id}" might work as well, but right now I'm
not sure if the form is sometimes rendered twice for the same question.
7 lines
378 B
Plaintext
7 lines
378 B
Plaintext
<%= form_tag(create_answer_question_path(question, token: token), method: :post, remote: true) do %>
|
|
<% id = "your_answer_#{SecureRandom.hex}" %>
|
|
<%= label_tag :answer, t("poll_questions.show.your_answer"), for: id %>
|
|
<%= text_field_tag :answer, nil, class: "medium-10", id: id %>
|
|
<%= submit_tag t("poll_questions.show.add_answer"), class: "button success" %>
|
|
<% end %>
|