I have an AJAX form that I've created into a block exposed on my current page. I will have an interface that will allow the users to select an indefinite amount of content to be used within the submit function of the form.
All the variables that will be passed to my form are node ID numbers, but there could be 1, there could be 50.
I have the Jquery action ready to update my ID numbers but I don't know how to get my ID number from Jquery into a variable, which can then be read when the AJAX form is submitted.
I've been looking at this - How to pass Javascript variable with form on submit?
and this - How to trigger a form and pass variables to $form_state with jQuery?
And I've been looking at the responses to both, but neither seem to give me access to the data I need, or are only speaking about a single variable, I need to pass a list or an array.
Would it be best to write something to trigger the form rebuild when I provide a new ID and allow the ID to be written into the form via that method?
form didn't seem to pick them up
should be like any regular field, did you look inside$form_state
?textfield
.