I would like the id
for my input to be user[email]
and not user_email
. But everything I try doesn't work.
I am using the latest version of Devise for these gems.
This is my form:
<%= form_for(resource, :as => resource_name, :class => "send-with-ajax", :url => user_registration_path(resource), :validate => true, :html => { :id => 'user_new' }) do |f| %>
<div class="six columns alpha">
<%= f.text_field :email, :id => 'user[email]', :placeholder => "your-email@address.com", :input_html => {:autofocus => true}, :validate => true %>
</div>
<div class="three columns sign-up alpha">
<%= f.submit :label => "Submit", :value => "Sign Me Up!" %>
<div class="ajax-response"><%= devise_error_messages! %></div>
</div>
<% end %>
This is the HTML produced:
<form accept-charset="UTF-8" action="/users" class="formtastic user" data-validate="true" id="user_new" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="khstyw72jj44kkhaskdya3hkb3ba3lkxmw4=" /></div>
<div class="six columns alpha">
<input data-validate="true" id="user_email" input_html="{:autofocus=>true}" name="user[email]" placeholder="your-email@address.com" size="30" type="text" />
</div>
<div class="three columns sign-up alpha">
<input label="Submit" name="commit" type="submit" value="Sign Me Up!" />
<div class="ajax-response"></div>
</div>
</form>
Thoughts?