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 8355 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am attempting to work with CDML and have a problem with the following code in creating a "details" page as from the CDML Templates:

code:


[FMP-Field: comments]

[FMP-Field: date]

<P>Comment<BR>

<INPUT TYPE="text" NAME="Field Name1" VALUE="[FMP-field: comments]">

<P>Date<BR>

<INPUT TYPE="text" NAME="Field Name2" VALUE="[FMP-field: date]">

I am not displayed any data and would like to know why.

Thanks

Posted

[FMP-Field: comments]

[FMP-Field: date]

<P>Comment<BR>

<INPUT TYPE="text" NAME="Field Name1" VALUE="[FMP-field: comments]">

<P>Date<BR>

<INPUT TYPE="text" NAME="Field Name2" VALUE="[FMP-field: date]">

"I am not displayed any data and would like to know why"

There are obvious reasons. (1) The code which you have displayed is like mixed metaphors. That is some code is meant for display of data, some is meant to transmit data as part of a form action. (2) To display data from a db file you must be in contact with that file. (3) To input data into a file you must make contact with that file.

I would presume from your code that you are just beginning. I strongly recommend reading a book, using an interactive demonstration or taking a course (in other words learning the language) before attempting to undertake designing browser solutions. Be aware that you will need to put in some time. Devote some time specifically for this. It will save you time in the long run. I also strongly recommend spending at least one-half hour every day reading in the Internet Forums, even if it is just keeping up with the current board and not doing research on old threads. However, you would be well advised to research some of the old threads as well for there is a lot of valuable information which is vital to a successful solution.

I have written an interactive demonstration for beginners on the basics of integration of cdml with html. It also includes some advanced development concepts. You can find out more about one of those advanced concepts at my website http://www.simplifyfm.com:591/

SIMPLIFY ...

Keith

[ March 16, 2002, 07:28 AM: Message edited by: Keith M. Davie ]

Posted

Thanks Kieth, I agree with everyword you said. I had read the instructions in the CDML Web Tools and was trying to follow along with the instructions on the "Detail" page template of the CDML tool.fp5 which is as follows. I simply posted the code section I thought was causing problems. Thanks for your reply. Here is the entire code:

code:


<HTML>

<HEAD>

<TITLE>Database Detail Record</TITLE>

</HEAD>

<BODY>

<H2>Sample Detail Record</H2>

<P><!-- Note: Follow the steps below to create an HTML form to display details

about one record in your FileMaker Pro database. Records can be edited

or deleted from this format file. An angle bracket and two hyphens indicate

comments; comments are not displayed by the Web browser.-->

<P><!-- STEP 1. SPECIFY THE FORM ACTION

The form action is already set to "FMPro." When submitting

this form, the Web server is notified to pass this format file to

FileMaker Pro 4.0 for processing.-->

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

<P><!-- STEP 2. SPECIFY THE DATABASE

If you've chosen a database in the CDML Tool, the database name should already

be specified within the Database CDML tag. If the database name has not been

specified or is incorrect, delete the database name specified in the Value section

of the CDML database tag below and type the database name within the quotation marks.-->

<P><INPUT TYPE="hidden" NAME="-DB" VALUE="comments.fp5">

<P><!-- STEP 3. SPECIFY THE RECORD ID

The -recid CDML tag specifies which record will be edited.

This tag is necessary on all format files that edit or delete a record

in a FileMaker Pro database. Do not remove or edit this tag.-->

<P><INPUT TYPE="hidden" NAME="-recid" VALUE="[FMP-currentrecid]">

<P><!-- STEP 4. SPECIFY THE LAYOUT

If you've chosen a database and layout in the CDML Tool, the layout name should

already be specified within the Layout CDML tag. The layout should be the same

one referenced in the new or search form used prior to reaching this detail page.

If the layout name has not been specified or is incorrect, delete the layout

name specified in the Value section of the CDML Layout tag below and type

the appropriate database name within the quotation marks.-->

<P><INPUT TYPE="hidden" NAME="-lay" VALUE="Layout #1">

<P><!-- STEP 5. SPECIFY THE FILENAME FOR THE EDIT RESPONSE FILE

Update the path specified in the VALUE section of the CDML FORMAT tag below,

which indicates the location of the next format file that is displayed after

the Web user submits this form. In the example below, the "editreply.htm"

format file will be displayed as the response after a record has been edited

from the FileMaker Pro database.-->

<P><INPUT TYPE="hidden" NAME="-format" VALUE="editreply.htm">

<P><!-- STEP 6. CHOOSE WHICH FIELDS TO DISPLAY

In the CDML Tool, choose Fields (Display) in the Category pop-up menu, choose

the HTML tag to display the data (text field, radio button, etc.), select the

field name, then drag the CDML syntax below this comment. The CDML syntax for

displaying field data is [FMP-field: field name]. Or simply edit the tags below

to match the field names you want to display. See the CDML Developers' Guide for

more information.-->

<P>Comment<BR>

<INPUT TYPE="text" NAME="comments" VALUE="[FMP-field: comments]">

<P>Date<BR>

<INPUT TYPE="text" NAME="date" VALUE="[FMP-field: date]">

<P><!--IF YOU'RE UPDATING RECORDS

In the CDML Tool, first choose a method to add fields in the Category pop-up

menu. Next, choose the HTML tag to display the data (text field, radio button,

etc.). Select the field name, then drag the CDML syntax below this comment. The

HTML tag that creates a blank text field is: <INPUT TYPE="text" NAME="Field Name1"

VALUE="" SIZE=25> -->

<P><!-- STEP 7. SPECIFY THE BUTTON ACTION

The first submit button edits a record in the FileMaker Pro database. To customize

the button text, delete the button text specified in the Value section of the

Delete CDML tag below and type the replacement text within the

quotation marks.-->

<P><INPUT TYPE="submit" NAME="-edit" VALUE="Edit Record">

<P><!-- STEP 8. SAVE FILE

Save this file to a project folder within the Web folder in the FileMaker Pro folder.-->

</FORM>

</BODY>

</HTML>

Posted

I am seeing the CDML tags only and the "Edit Record" button. I am "practicing" on my local hard drive and am therefore hosting locally, in case it matters.

Thanks

details.jpg?bcPuE58AWWfb6bO4

[ March 16, 2002, 04:18 PM: Message edited by: George ]

Posted

Thanks for the replies but, why does the code posted not show record content to the browser that are contained in the two fields? The data file is open, Web comp plug-in is checked, and web companion sharing is checked. Is there a problem with the CDML?

Posted

You need to have details.htm processed by WebCompanion first (as Keith and Anatoli implied). To do that you need to call it with either an FMP url or a form 'posted' to FMP. For example, the url would be:

http://localhost/FMPro?-db=mydb.fp5&-lay=web&-format=details.htm&-findall

The details.htm file must be located in the 'Web' folder of the FM program folder. The above url assumes that WebCompanion is set for port 80. It also assumes that the database file 'mydb.fp5' has a layout called 'web' containing the fields used.

Hope this helps.

Garry

[ March 17, 2002, 11:30 AM: Message edited by: Garry Claridge ]

Posted

Thanks Garry, worked great! It was a bit discouraging to not even see my data. I will continue to read and hopefully learn more about CDML.

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