jquery - how do I submit jqgrid values as formfields? -
I am trying to use jqGrid in a form where the user fills conventional forms such as phones, etc. is. A line item is a jackgread where the user can add / edit / insert rows, and when completed, submit the entire form. I have a grid job because I want to show it, I can not get the contents of the grid presented as part of an integrated form.
Here is an example of a proxy code:
& lt; Form id = "foo" & gt; & Lt; Input id = "user name" type = "text" & gt; Your name & lt; Br> Enter your choice in the bottom grid: & lt ;! - Imagine jqGrid here - & gt; & Lt; Input type = "submit" value = "submit form" & gt; & Lt; / Form & gt;
I have searched, have scored, read docs, read wiki etc. but just do not see how to pass Jeff grid rows and columns as Farmfield . Any guidance would be appreciated. Perhaps the best way to do this would be to use the hidden form field:
Pre> & lt; Input type = "hidden" name = "grid data" value = "" />
You will then populate the fields with column data before submitting the form. You can either do this by updating the field because the grid data is modified, or by pressing the Javascript function, the button is pressed when the form is pressed to submit (and calling form with the form Submit
).
To write the grid data in the hidden field, you can call On the server, you can decode JSON from this hidden area, and you can process it accordingly. getRowData in a row on each line of the grid, and for each row an array of Can attach data for. Or maybe a better way, for example, can a new
data option work? Anyway, once you have grid data that you can use to sort the data into JSON format:
JSON.stringify (myGridData);
Comments
Post a Comment