Hello I am trying to serialize a form and submit it into my php. I have found that using the normal .serialize command turns spaces into ‘+’ so I am trying my luck at passing a JSON.
I was wondering how you could select only the input values with a class = pass?
<input class="pass">
I am using the bottom code to turn stuff into JSON, however I am stuck on how I can select by classes?
Is there a better way to do this?
Instead of doing:
Just change the form selector to .pass:
Only DOM elements with the ‘pass’ class will be serialized now.