Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7811 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

  • Newbies
Posted

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!

Posted

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.

  • Newbies
Posted

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.

Posted

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

This topic is 7811 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.