Note that there are some explanatory texts on larger screens.

plurals
  1. POModify POST String From Modal jqGrid Add/Edit Form
    primarykey
    data
    text
    <p>I have a jqGrid-based application which currently retrieves data from my database and displays as intended in my grid. Inline editing is disabled; I am using modal forms for editing existing records and adding new ones. What I'm struggling with is how to access the process where data is added/edited. For example, when I edit a record and submit the form I see a POST to my api.php which contains field=value pairs. Example...</p> <pre><code>field1=test&amp;field2=+2&amp;oper=edit&amp;id=1 </code></pre> <p>In the above sample data, using the edit form, I changed the value in field2 - jQuery/jqGrid added the '+' in front of the value '2' as well as adding the 'oper=edit'. Ultimately I need to be append additional fields and values to the POST string but am unsure how to do so.</p> <p>===Edit===<br> Since my original post has yielded no feedback I suppose this edit is necessary.</p> <p>I have figured out where the mysterious '+' comes from in my sample data and that has been addressed. That's not important though.</p> <p>Another way to think about what I'm trying to accomplish is, one way or another, I need to add additional fields to the POST string before sending the data to the server. For example, I might like to add a statically named field with a statically assigned value; the resulting POST string would look like:</p> <pre><code>field1=test&amp;field2=2&amp;oper=edit&amp;id=1&amp;widget=1 </code></pre> <p>Notice the only difference in this sample and the previous is the addition of the 'widget' field with a value of '1'.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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