title: Rails: Change form action from submit_tag
body: <p>I have a form which is always submitting the form to the "update" function in the controller, and I have created this form using "remote_form_for" tag. In this form I have objects from different tables, and from this form I want to submit entire form data to another function(not to the "update" function) via AJAX request.</p>
  
  <p>I have tried many methods including using submit tag with action </p>
  
  <pre><code>&lt;% remote_form_for @employee, :url =&gt; organization_employee_path(@organization, @employee), :method =&gt; :put do |employee_form| %&gt;
    // form objects and other functionalities
       ....
       ....  
           // views inside the forms
           &lt;div id="employee_header_div"&gt;
             &lt;%= render :partial =&gt; "employee_header", :locals =&gt; {:employee =&gt; @employee} %&gt;
           &lt;/div&gt;
           ...
           ... 
       &lt;%= submit_tag "page_level_validation", :id =&gt; "page_level_validation" , :action=&gt;"validate"%&gt;
   &lt;% end %&gt;
  </code></pre>
  
  <p>But the Ajax request always calling the same "update" function. </p>
  
  <p>It would be very helpful, if anyone helps to resolve this issue.</p>