sakshik12 sakshik12 - 8 months ago 55
Ruby Question

signup form -- Rails + foundation

Im using foundation-rails and creating a signup form.

This is what Im using to create a password field in a div.

<%= text_field_tag "password", "", placeholder: "Password", required: true, type: "password" %>
<small class="error">Invalid</small>

For the confirm password field, I am setting it up similarly, in a div:

<%= text_field_tag "password_confirmation", "", placeholder: "Reenter password" , required: true, type: "password" %>
<small class="error >Invalid</small>

I want to use foundation's
for the password confirmation to make sure the same password is entered. But Im unable to add it to Rails(it does not work).

any help ?


You can add any HTML option you need:

<%= text_field_tag "password", "", placeholder: "Password", required: true, type: "password", data: { equalto: "browser" } %>