Note that there are some explanatory texts on larger screens.

plurals
  1. POform serialize problem
    text
    copied!<p>I have a form. I am trying to validate it through AJAX GET requests.</p> <p>So i am trying to send the field values in the GET request data.</p> <pre><code>$('#uxMyForm').serialize(); </code></pre> <p>the problem it is returning something undecipherable. I have used serialize before. This is totally bizzare.</p> <p>the return value of serialize is </p> <pre><code> actionsign_upcontrollersitedataauthenticity_token=oRKIDOlPRqfnRehedcRRD7WXt6%2FQ0zLeQqwIahJZJfE%3D&amp;customer%5BuxName%5D=&amp;customer%5BuxEmail%5D=&amp;customer%5BuxResidentialPhone%5D=&amp;customer%5BuxMobilePhone%5D=&amp;customer%5BuxDateOfBirth%5D=&amp;customer%5BuxAddress%5D=&amp;customer%5BuxResidentialStatus%5D= </code></pre> <p>i have no idea how to use this.</p> <p>Thanks</p> <p><strong>update:</strong></p> <p>My question is how do i process such a request? like this?</p> <pre><code>puts params[:data][:customer][:uxName] </code></pre> <p>my GET request trigger looks like this</p> <pre><code>$.get('/site/sign_up',{data : $('#uxMyForm').serialize() }, function(data){ alert(data); }); </code></pre> <p>The above jquery lines generate the request.. on the action method i do the following</p> <pre><code>render :text =&gt; params </code></pre> <p>when i observe what is sent in the GET,in firebug PARAMS</p> <pre><code>**data** authenticity_token=oRKIDOlPRqfnRehedcRRD7WXt6%2FQ0zLeQqwIahJZJfE%3D&amp;direct_customer%5BuxName%5D=&amp;direct_customer%5BuxEmail%5D=&amp;direct_customer%5BuxResidentialPhone%5D=&amp;direct_customer%5BuxMobilePhone%5D=&amp;direct_customer%5BuxDateOfBirth%5D=&amp;direct_customer%5BuxAddress%5D=&amp;direct_customer%5BuxResidentialStatus%5D= </code></pre> <p>the return value that i print in alert has </p> <pre><code>actionsign_upcontrollersitedataauthenticity_token=oRKIDOlPRqfnRehedcRRD7WXt6%2FQ0zLeQqwIahJZJfE%3D&amp;direct_customer%5BuxName%5D=&amp;direct_customer%5BuxEmail%5D=&amp;direct_customer%5BuxResidentialPhone%5D=&amp;direct_customer%5BuxMobilePhone%5D=&amp;direct_customer%5BuxDateOfBirth%5D=&amp;direct_customer%5BuxAddress%5D=&amp;direct_customer%5BuxResidentialStatus%5D= </code></pre>
 

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