Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi,

I'm having a problem with format files in CDML. I have a form which invites new clients to fill in their details. When they're done, they press a button to submit the data. At this point I call a format file to tell them they've been successful. Let's call this file clientnew_reply.htm

Here's some of the code I'm using:

<P><INPUT TYPE="hidden" NAME="-DB" VALUE="itcfcustomers">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="CGI"> <INPUT TYPE="hidden" NAME="-format" VALUE="clientnew_reply.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm"></P>

The problem I'm having is that I get an error (in explorer 5 and netscape 4.7). On pressing submit, both browsers give a format file not found error, citing clientnew_reply.htm as the absent document. More seriously, they fail to update Filemaker with the data from the form.

The file clientnew_reply.htm does indeed exist and is clearly visible in the web folder. I've tried renaming it manually, renaming by cutting and pasting test from the html (to ensure the names are identical), rebooting and overwriting my TCP/IP preferences. I really can't figure what the problem is. Can anyone else? I'll miss my deadline if I'm not careful.

I'm working offline (ie MacIP with 10.10.10.10) and running FMP5 under MacOS9.1.

Posted

Keith, here's the rest of the code. (actually there's still more, but it's only 20 more fields in the form, nothing that could cause the not found error):

<HTML>

<HEAD>

<TITLE>Clients - New Record</TITLE>

<X-CLARIS-WINDOW TOP=40 BOTTOM=598 LEFT=127 RIGHT=809>

<X-CLARIS-TAGVIEW MODE=full>

</HEAD>

<BODY BGCOLOR="#FFFFFF">

<P><FORM ACTION="FMPro" METHOD="post">

<P><INPUT TYPE="hidden" NAME="-DB" VALUE="itcfcustomers">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="CGI"> <INPUT TYPE="hidden" NAME="-format" VALUE="clientnew_reply.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm"></P>

<P>

<TABLE BORDER=0 width="255">

<TR>

<TD ALIGN=center width="158">

<P ALIGN=left><FONT SIZE="+3"><B><font face="Verdana, Arial, Helvetica, sans-serif">New

Record</font></B></FONT></P>

</TD>

</TR>

</TABLE>

<p></P>

<P><font face="Verdana, Arial, Helvetica, sans-serif">Please enter your details

below. </font></P>

<P><font face="Verdana, Arial, Helvetica, sans-serif">You'll need to make up

a password and Customer ID for the login screen. Choose anything you like,

as long as it's memorable to you and can't be guessed by someone else.</font></P>

<P>

<TABLE BORDER=0 WIDTH="100%">

<TR>

<TD WIDTH="33%">

<P ALIGN=right><font face="Verdana, Arial, Helvetica, sans-serif">Customer

ID:</font></P>

</TD>

<TD>

<P>

<INPUT TYPE=text NAME="Customer ID" VALUE="" SIZE=30>

</P>

</TD>

</TR>

<TR>

<TD WIDTH="33%">

<P ALIGN=right><font face="Verdana, Arial, Helvetica, sans-serif">Password:</font></P>

</TD>

<TD>

<P>

<INPUT TYPE=text NAME=Password VALUE="" SIZE=30>

</P>

</TR>

</TABLE>

<p></P>

<P><BR>

<INPUT TYPE="submit" NAME="-New" VALUE="Submit">

<SPACER TYPE=horizontal SIZE=15> <INPUT TYPE=reset VALUE="Reset this form"></P>

<P><A HREF="clientdefault.htm"><font face="Verdana, Arial, Helvetica, sans-serif">Return

to Home Page</font></A>

</FORM><p></P>

</BODY>

</HTML>

Posted

dylan,

Just to harp on the previous point. If the -format file is in a different location than the page making the request it must be pointed to in the FORM ACTION ="http://domain&port/format file"

A solution to this problem may be for you to use the -fmtfield=FMP field name in DB to replace -format. You can use this in your form request to specify a global field in your DB. Copy the HTML and CDML code into a global text field and this will act as your -format file. You can also make it a non global format file field if you use the -recid variable to specify where the format field is in the DB.

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-DB" VALUE="itcfcustomers">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="CGI">

<INPUT TYPE="hidden" NAME="-fmtfield" VALUE="clientnew_reply(global field in DB)">

---

Mark.

------------------

Posted

dylan, I don't use a html editor like HomePage, so I would write the code a bit differently:

<html>

<head><title>Clients - New Records</title>

</head>

<body bgcolor="#ffffff">

<p><center>

<table width="80%" border="0">

<tr><td align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><h1>New Record</h1></font></td></tr>

<tr><td><font face="Verdana, Arial, Helvetica, sans-serif">Please enter your details below. </font></td></tr>

<tr><td>You'll need to make up a password and Customer ID for the login screen. Choose anything you like, as long as it's memorable to you and can't be guessed by someone else.</font></td></tr>

</table></center>

<p align="center">

<form action="fmpro" method="post">

<input type="hidden" name="-DB" value="itcfcustomers">

<input type="hidden" name="-Lay" value="CGI">

<input type="hidden" name="-format" value="clientnew_reply.htm">

<input type="hidden" name="-error" value="new_error.htm">

<table width="80%" border="0">

<tr><td width="33%" align="right"><font face="verdana, arial, helvetica, sans-serif">Customer ID:</font></td>

<td><input type="text" name="Customer ID" value="" size="30"></TD></TR>

<!--field name "Customer ID" contains a space, problematic-->

<tr><td width="33%" align="right"><font face="verdana, arial, helvetica, sans-serif">Password:</font></TD>

<td><input type="password" name=Password value="" size="30"></td>

</tr>

<tr><td> </td></tr>

<tr><td width="33%" align="right">

<input type="submit" name="-New" value="Submit">

</td>

<td><input type="reset" value="Reset this form"></td></tr>

</table>

</form>

<p><a href="clientdefault.htm"><font face="verdana, arial, helvetica, sans-serif">Return

to Home Page</font></a>

You will note my comment line. The use of spaces in field names can be problematic. This could be the reason that data is not being entered into a new record. Rather than deal with formatting problems, I limit field names to no more than 8 characters, avoid beginning field names with periods or hyphens and avoid the use of spaces. With db and format files naming I recommend the old eightdotthree protocol.

You will also note that I changed your Password input type to "password" as that generates bullets on the browser page, which clients seem to like.

Also, I am not clear why you would have the customer provide a "unique" ID rather than generating one as a calculation or serial number on the creation of the record.

Also, I try to keep the form action grouped with all the hidden fields together and all the client input fields together. And I relocated the </form> command.

I hope some of this is useful to your solution.

Peace

Keith M. Davie

This topic is 8754 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.