Note that there are some explanatory texts on larger screens.

plurals
  1. POCustomizing Devise method
    text
    copied!<p>I am using Devise in my web application and was wondering how to use a different button than the default one to submit information. I am attempting to embed it in a twitter boot strap modal, and use a button in the footer of the modal to submit the info, rather than the standard signup button. Here's what I have for code right now:</p> <pre><code>&lt;div class="modal-body"&gt; &lt;h4&gt;...&lt;/h4&gt; &lt;p&gt;...&lt;/p&gt;&lt;/b&gt; &lt;p&gt;...&lt;/p&gt; &lt;%= form_for(resource, :as =&gt; resource_name, :url =&gt; registration_path(resource_name)) do |f| %&gt; &lt;%= devise_error_messages! %&gt; &lt;div&gt; &lt;%= f.label :email %&gt; &lt;%= f.email_field :email %&gt; &lt;/div&gt; &lt;div&gt; &lt;%= f.label :password %&gt; &lt;%= f.password_field :password %&gt; &lt;/div&gt; &lt;div&gt; &lt;%= f.label :password_confirmation %&gt; &lt;%= f.password_field :password_confirmation %&gt; &lt;/div&gt; &lt;div&gt; &lt;%= f.submit "Sign up" %&gt; &lt;/div&gt; &lt;% end %&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;a href="#" class="btn" data-dismiss="modal"&gt;Close&lt;/a&gt; &lt;a href="#" class="btn btn-primary"&gt;Sign up&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>In essence, I am trying to make the button in this line</p> <pre><code>&lt;a href="#" class="btn btn-primary"&gt;Sign up&lt;/a&gt; </code></pre> <p>do what the button in this line does:</p> <pre><code>&lt;div&gt;&lt;%= f.submit "Sign up" %&gt;&lt;/div&gt; </code></pre> <p>Anybody out there have any experience with this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload