Questions tagged [serializearray]

79 questions
0
votes
1 answer

jquery serialize collecting multiples form which group values by name

How to collect multiples form input and group the output into string which combines values by name For example:
Denis
  • 73
  • 13
0
votes
1 answer

I can't seem to add to the array generated by serializeArray

Here's the code. var postData={}; event.stopPropagation(); postData.action='preview'; postData.data=$("form#gaarrl").serializeArray(); var n=[]; n['name']='media'; n['value']=imgName; postData.data.push(n); …
user1424074
  • 137
  • 1
  • 7
0
votes
1 answer

How to upload image while using serialize Array in JavaScript?

I am working on a form which need to insert some data with an image without reloading the page. In my side everything is working fine when there is no image filed in the form, but if there is an in my form, then my code is not…
0
votes
1 answer

Jquery serializeArray not getting all fields

I have this HTML:
ehmhrgelcighsawmlv
  • 309
  • 1
  • 3
  • 14
0
votes
1 answer

Does serializeArray sanitize input before being passed to eval?

Out of curiosity since eval is "evil". Would serializing an array protect against xxs attacks? From my understanding the serializeArray() method creates a JavaScript array of objects, ready to be encoded as a JSON string. If so, what would be a…
user11006286
0
votes
1 answer

How to use nested HTML as JavaScript Object/Array keys

I am trying to prepare the following inputs to use them in an ajax function to validate them with PHP. The array…
Alex Schwifty
  • 59
  • 3
  • 11
0
votes
1 answer

Serialize form using SerializeJSON

I want to serialize my form using SerializeJSON and I have a div which have multiple tab inside and each tab have multiple form. How can i loop inside the div to get the tab and inside each tab I want to get the form so I can serialize it and after…
fatin amirah
  • 101
  • 2
  • 12
0
votes
1 answer

Jquery SerializeArray and Push Object list

I'am SerializeArray using and try to push object list but always is null on server side var $form = $('#personelReqForm'); var model = $form.serializeArray(); model.Leavemembers = [], model.MemberLanguages = []; …
0
votes
2 answers

Getting HTML custom data-* attributes from radio buttons on form submit

Is there a way to get the custom HTML data-* attributes for the selected radio button when you submit a form? The value does not seem to get picked up by serializeArray(). HTML
artomason
  • 3,625
  • 5
  • 20
  • 43
0
votes
1 answer

pushing array into serializeArray send by ajax

I use this code for my form var formData = $("#form").serializeArray(); now I want to push an array into formData variable like this [{"name":"xxxx"},{"name":"xxxx"}] or push the array to object of the formData Update: I want to send the data via…
0
votes
0 answers

jQuery - Add to Serialized Array

I've tried various ways to add to my serialized array, but I keep running into the following issues: My first attempt results in: [object Object]&username=1 being sent. var vals = {}; $.each($('#my-form').serializeArray(), function(i, field) { …
Dodinas
  • 6,705
  • 22
  • 76
  • 108
0
votes
0 answers

Jquery serializeArray break then continue

I'm really new to using serializeArray in jQuery so please forgive me if i'm not asking the correct question. I have a form which on click add the data to fields within a div ID which works fine, it keeps adding data each time i click which is…
bennyc
  • 23
  • 5
0
votes
2 answers

Jquery form serializeArray to string

How to convert this array to string separated by commas with jquery? var array = $('#form').serializeArray(); Thanks!
user558134
  • 1,071
  • 6
  • 25
  • 38
0
votes
1 answer

serializeArray is not picking up dynamically created form

I have reviewed many Stack overflow threads on this topic most especially this one jQuery serializeArray not picking up dynamically created form elements, but none was able to solve the problem I am searching through firebase database for a match.…
jone2
  • 191
  • 1
  • 4
  • 18
0
votes
1 answer

jQuery serializeArray() all :inputs

Does serializeArray() only work on input and textarea. how about select, checkbox, and radio buttons. I need to know which option is selected from select box and whether checkbox is checked or not. How can we get all this info in an…
Hussein
  • 42,480
  • 25
  • 113
  • 143