cmury Posted October 25, 2002 Posted October 25, 2002 All, I am currently having problems creating/editing/duplicating records from a published record detail page created using CDML. The detail page is part of a simple frameset that has a navigation frame on the left and a published Contact DB on the right. I can successfully search, view results and view the Contact data in this right frame. However when I try to create/edit/duplicate from the record details page using the associated form buttons I always receive an error message [normally type 4] using the correct HTML error files. I have checked the form description multiple times but with no results. It seems that the pages are correctly retrieving the data from the Contacts DB but when an attempt to modify this DB is made then the whole thing goes turkey. Any ideas or suggestions would be greatly appreciated. Thanks C
Garry Claridge Posted October 25, 2002 Posted October 25, 2002 You may need to use an extra line in each of the forms, e.g.: <input type="hidden" name="-new"> This error occurs with some browsers while using framesets and the user resizes the window, or presses return. All the best. Garry
Jeff Spall Posted October 25, 2002 Posted October 25, 2002 Code 4 is just 'unknown command' - can you post the page cdml here? regards, jeff
cmury Posted October 26, 2002 Author Posted October 26, 2002 Jeff, HTML & CDML as follows. Apologies for including all the table code but you now get the full picture. <FORM ACTION="FMPro" METHOD="POST"> <P> <INPUT TYPE="hidden" NAME="-DB" VALUE="Contacts.fp5"> <input type="hidden" name="-recid" value="[fmp-currentrecid]"> <input type="hidden" name="-Lay" value="Contacts"> <INPUT TYPE="hidden" NAME="-Format" VALUE="/Contacts/record_detail_reply.htm"> <INPUT TYPE="hidden" NAME="-Error" VALUE="/Errors/record_detail_error.htm"> <TABLE WIDTH="750" cellpadding="5" CELLSPACING=0 class="Border" id="Contact Data"> <TR> <TD WIDTH=80> <P>First Name:</P></TD> <TD> <P> <INPUT TYPE="Text" NAME="first name2" VALUE="[FMP-Field: first name]" SIZE=55> </P></TD> <TD WIDTH=25>Title:</TD> <TD> <input type="Text" name=title2 value="[FMP-Field: title]" size=5></TD> <TD WIDTH=60> <P>Category:</P></TD> <TD> <P> <INPUT TYPE="Text" NAME=category2 VALUE="[FMP-Field: category]" SIZE=20> </P></TD> </TR> <TR> <TD WIDTH=80> <P>Last Name:</P></TD> <TD> <P> <INPUT TYPE="Text" NAME="last name2" VALUE="[FMP-Field: last name]" SIZE=55> </P></TD> <TD WIDTH=25>Suffix:</TD> <TD> <input type="Text" name=suffix2 value="[FMP-Field: suffix]" size=5></TD> <TD WIDTH=60> <P>Updated:</P></TD> <TD> <P> [FMP-FIELD: Modification Date] </P></TD> </TR> </TABLE> <br> <table width="750" align="center" cellpadding="0" cellspacing="0" id="Holder"> <tr> <td width="365" valign="top"> <table width="365" align="center" cellpadding="5" cellspacing="0" class="Border" id="Company"> <tr> <td>Company:</td> <td colspan="3"> <input type="Text" name=company value="[FMP-Field: company]" size=55></td> </tr> <tr> <td>Department:</td> <td> <input type="Text" name=dept value="[FMP-Field: dept]" size=15></td> <td>Job Title:</td> <td> <input type="Text" name="job title" value="[FMP-Field: job title]" size=15></td> </tr> </table> <br> <table width="365" align="center" cellpadding="5" cellspacing=0 class="Border" id="Address"> <tr> <td> <p>Address:</p></td> <td colspan="3"> <p> <input type="Text" name="work address line 1" value="[FMP-Field: work address line 1]" size=55> </p></td> </tr> <tr> <td> <p></p></td> <td colspan="3"> <p> <input type="Text" name="work address line 2" value="[FMP-Field: work address line 2]" size=55> </p></td> </tr> <tr> <td> <p>City / Suburb:</p></td> <td> <p> <input type="Text" name="work city" value="[FMP-Field: work city]" size=15> </p></td> <td>Post Code:</td> <td> <input type="Text" name="work zip" value="[FMP-Field: work zip]" size=15></td> </tr> <tr> <td> <p>State:</p></td> <td> <p> <input type="Text" name="work state" value="[FMP-Field: work state]" size=15> </p></td> <td>Country:</td> <td><input type="Text" name=Country value="[FMP-Field: Country]" size=15></td> </tr> </table> </td> <td width="20"> </td> <td width="365" valign="top"> <table width="365" align="center" cellpadding="5" cellspacing="0" class="Border" id="Details"> <tr> <td>Tel:</td> <td>+ [FMP-FIELD: Countries::Phone Code] <input type="Text" name="work area code2" value="[FMP-Field: work area code]" size=5> <input type="Text" name="work phone" value="[FMP-Field: work phone]" size=17> </td> </tr> <tr> <td>Fax:</td> <td>+ [FMP-FIELD: Countries::Phone Code] <input type="Text" name="work area code" value="[FMP-Field: work area code]" size=5> <input type="Text" name="work fax" value="[FMP-Field: work fax]" size=17></td> </tr> <tr> <td>Mobile:</td> <td><input type="Text" name="cell phone" value="[FMP-Field: cell phone]" size=30></td> </tr> <tr> <td>E-mail:</td> <td><input type="Text" name="email address" value="[FMP-Field: email address]" size=30></td> </tr> <tr> <td>Web Site:</td> <td><input type="Text" name="work URL" value="[FMP-Field: work URL]" size=30></td> </tr> </table></td> </tr> </table> <br> <TABLE WIDTH="750" cellpadding="5" CELLSPACING=0 class="Border" id="Contact Data"> <TR> <TD VALIGN=top WIDTH=60> <P>Projects:</P></TD> <TD VALIGN=top WIDTH=275> <P> [FMP-PORTAL: ContactProject Data] <TABLE WIDTH="100%" BORDER=0 CELLSPACING=1 class="BodyText"> <TR> <TD WIDTH=55> <P> [FMP-FIELD: ContactProject Data::Project No] </P></TD> <TD> <P> [FMP-FIELD: ContactProject Data::Project Name] </P></TD> </TR> </TABLE> [/FMP-PORTAL] <p></P></TD> <TD VALIGN=top WIDTH=60> <P>Notes:</P></TD> <TD VALIGN=top WIDTH=275> <P> <TEXTAREA NAME=textarea ROWS=5 COLS=30 WRAP=virtual>[FMP-Field: notes]</TEXTAREA> </P></TD> </TR> </TABLE> <br> <TABLE WIDTH="750" id="Contact Data"> <TR> <TD COLSPAN=4 WIDTH=750> <P> <input type="submit" name="-Edit" value="Edit Record"> <input name="reset22" type=reset value="Reset this form"> <input type="submit" name="-Dup22" value="Duplicate Record"> <INPUT TYPE="Submit" NAME="-Delete22" VALUE="Delete Record"> <input type="submit" name="-Submit" value="Submit"> </P></TD> </TR> </TABLE> </FORM></CENTER>
Garry Claridge Posted October 26, 2002 Posted October 26, 2002 I think you may have a problem here: <input type="submit" name="-Edit" value="Edit Record"> <input name="reset22" type=reset value="Reset this form"> <input type="submit" name="-Dup22" value="Duplicate Record"> <INPUT TYPE="Submit" NAME="-Delete22" VALUE="Delete Record"> <input type="submit" name="-Submit" value="Submit"> You can have only one action tag. However, you can use some Javascript to insert the action tag for the desired action. All the best. Garry
Jeff Spall Posted October 28, 2002 Posted October 28, 2002 Hi, yes I think Garry has it. Buttons that would work would be: <INPUT TYPE="submit" NAME="-Edit" VALUE="Edit Record"><INPUT TYPE="Submit" NAME="-Delete" VALUE="Delete Record"><INPUT TYPE="submit" NAME="-Dup" VALUE="Duplicate Record"> But duplicating this record might cause problems with your portal records?? Also, further up the form I see a couple of lines like: <INPUT TYPE=text NAME="first name2" VALUE="[FMP-Field: first name]" SIZE=55> This will be showing the info. from the field 'first name' but posting it to the field 'first name2'. I guess you'd normally display data from and post to the same field. Do you have a 'first name2' field on that layout? regards, jeff
cmury Posted October 29, 2002 Author Posted October 29, 2002 Thanks Guys - the help is really appreciated - But unfortunately with no luck I've tried your suggestion regarding the form buttons - even deleting all the buttons except the submit and clear. This only produced a 102 error. So I immediately thought of the FMP-Field definitions being incorrect and Garry's comment. I checked thoroughly. All definitions seem to be correct. The suffix 2 [eg first name2] must be a hangover from when I created the form fields by drag-copying in Dreamweaver. I can only think of a few things that can be causing the problem. 1 - Can you place portals in form definitions? 2 - Can you place no editable FM Fields in forms eg [FMP-FIELD: Countries::Phone Code]? 3 - When you call an external, referneced DB in a form [ie not the DB in th form header] like in the example shown in question 2 - how is this referenced DB handled? Any comments or suggestions would be appreciated. Thanks Chris
Jeff Spall Posted October 29, 2002 Posted October 29, 2002 Hi, error 102 is 'field is missing - one of the fields named in your html page isn't on the database layout you're posting to. One thing that can cause problems when you use editors is that when you have spaces in fieldnames thay can get replaced with '%20' in the html. For your questions: 1 - Yes, you can have portals in forms but you won't be able to edit them direct (see discussions on the forum for ways to do this) 2 - Yes, you can have read-only fields or hidden fields in forms. 3 - Yes, you can have related fields and these are editable provided the field is on yourdatabase layout as an editable field. regards, Jeff
Garry Claridge Posted October 29, 2002 Posted October 29, 2002 1 - Can you place portals in form definitions? Yes, you can use the [FMP-Portal] tags. However, you have to follow certain rules to edit them. 2 - Can you place non editable FM Fields in forms eg [FMP-FIELD: Countries::Phone Code]? Not within <input> tags. If [FMP-FIELD: Countries::Phone Code] is non-editable and it is named in an <input> tag you will receive an error. 3 - When you call an external, referneced DB in a form... You can use [FMP-InlineActions] to display data from another database. Also, check that any fields named in <input> tags are present on the "Contacts" Layout. Good Luck. Garry
cmury Posted October 30, 2002 Author Posted October 30, 2002 OK - Got it to work!! It's always so simple!! Mental note - don't use spaced text [eg "job title"] in FM field names! Chris
cmury Posted October 31, 2002 Author Posted October 31, 2002 Jeff/Garry, You mention rules/procedures' for editing portals in custom web publishing. Could you direct me to details of these. Call me lazy but I couldn't find them. Thanks Chris
Garry Claridge Posted October 31, 2002 Posted October 31, 2002 Check the "CDML Reference" database. Search for the link to it on this Forum. Also, search for "portal" or "[FMP-Portal" on the Filmaker site. All the best. Garry
sricant Posted November 7, 2002 Posted November 7, 2002 Hi, can any one give me code for changing password like in our mail id creation. i.e entering old password first and entering new password two times like sign up pages in mails. thanks sri
Recommended Posts
This topic is 8043 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 accountSign in
Already have an account? Sign in here.
Sign In Now