Does anyone have an example of the db2FormIt successfully working (ie populating fields in the form with data)? I have the same question stowelly had at the end of page 8 of this thread (copied below in quote)
I'm not sure how to setup the FormIt call parameters ¶mname and &fieldname and how to use them, and how the &where factors in....can anyone quickly post an example?
Quote from: stowelly at Sep 18, 2013, 06:52 PM
if you want to edit table-row add &resId=yourRowID to your URL <- replace yourRowID with id of tablerow
im having trouble with working out how this is supposed to work? is row id the primary key in my table? for one table I have a dual key, how would that work?
also I cant see any reference to "resId" in the code from package manager, so im guessing from the docs im supposed to use the "where" clause? I cant seem to get this correct either, here is my formit call
but it doesnt do what i am hoping...... I was hoping that if a value was specified then it would grab that row from my db and fill the fields (provided i use the fi.fieldname type bits).... will paste my whole resource in, incase anyone can see what it is im doing wrong, but im really stumped with this!
<form class="form" action="[[~[[*id]]]]" method="post">
<input name="resource_id" type="hidden" value="[[+fi.id]]">
<input name="nospam" type="hidden">
<input id="user_id" name="user_id" type="number" value="[[+fi.user_id]]">
<input id="address" name="address" type="text" value="[[+fi.address]]">
<input type="submit" value="Save">