June 26, 200322 yr Newbies Hi! Does anyone know of a good alternative to set field with IWP hopefully, or cdml specific example. I have a database which is not setup for the web, and it uses a lot of set field scripting to control which form to use for data entry. Much thanks in advance for any pointers!
June 26, 200322 yr Set field in CDML is through Form submitting. Do you know how to do HTML pages with Forms?
June 26, 200322 yr Author Newbies Yes, I have done a couple basic forms but not with cdml. Should I use <input type="hidden" name=[Not sure what to put here, so Filemaker knows how to store the text into a field] value="(someTextValue)"> Thanks for your fast response!!! I have to go now and I will see your post tomorrow!
June 27, 200322 yr That's right. Something like: <FORM ACTION="FMPRO" METHOD="POST"> <INPUT TYPE="hidden" NAME="-db" VALUE="database.fmp"> <INPUT TYPE="hidden" NAME="-lay" VALUE="web"> <INPUT TYPE="hidden" NAME="-format" VALUE="format_file.htm"> <INPUT TYPE=hidden NAME="-err" VALUE="edit_file.htm"> field1<INPUT TYPE=text NAME=field1 VALUE="[FMP-FIELD:field1]" SIZE=35> <INPUT TYPE="submit" NAME="-Edit" VALUE="Edit Record"> </FORM> Cheers, Peter.
June 27, 200322 yr In addition to the above -- get the CDML reference database, the best resource so far for CDML.
June 27, 200322 yr Author Newbies Peter, I tried the code from above and kept coming up with Record not found error. Here is my code: <FORM ACTION="FMPRO" METHOD="post"> <INPUT TYPE="hidden" NAME="-db" VALUE="test.fp5"> <INPUT TYPE="hidden" NAME="-lay" VALUE="layout1"> <INPUT TYPE="hidden" NAME="-format" VALUE="format_file.htm"> <INPUT TYPE=hidden NAME="-error" VALUE="edit_file.htm"> field1: <input type="text" name="field1" value="[FMP-Field:field1]" size=20> <INPUT TYPE="SUBMIT" NAME="-edit" VALUE="Edit Record"> </FORM> I set up the response file and the error file. Put this file and the other two in the Web directory for Filemaker Pro 5.5 It is probably something easy but I can't seem to locate the error... Thanks for your help.. ps. In the initial post set field was used to set a value not visible to the user. Thus a static text string needs to be put into a field which can't be edited by the user.
June 28, 200322 yr You will need the RecordID to edit a record: <FORM ACTION="FMPRO" METHOD="post"> <INPUT TYPE="hidden" NAME="-db" VALUE="test.fp5"> <INPUT TYPE="hidden" NAME="-lay" VALUE="layout1"> <INPUT TYPE="hidden" NAME="-format" VALUE="format_file.htm"> <INPUT TYPE=hidden NAME="-error" VALUE="edit_file.htm"> <input type="hidden" name="-recid" value="[FMP-CurrentRecID]"> field1: <input type="text" name="field1" value="[FMP-Field:field1]" size=20> <INPUT TYPE="SUBMIT" NAME="-edit" VALUE="Edit Record"> </FORM> If you wish to "Set" the fields in a new record just use something like this: <FORM ACTION="FMPRO" METHOD="post"> <INPUT TYPE="hidden" NAME="-db" VALUE="test.fp5"> <INPUT TYPE="hidden" NAME="-lay" VALUE="layout1"> <INPUT TYPE="hidden" NAME="-format" VALUE="format_file.htm"> <INPUT TYPE=hidden NAME="-error" VALUE="edit_file.htm"> field1: <input type="text" name="field1" value="" size=20> . . <INPUT TYPE="SUBMIT" NAME="-new" VALUE="Add Record"> </FORM> All the best. Garry
Create an account or sign in to comment