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

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

Recommended Posts

Posted

I know this is possible and should be fairly easy but I just can't seem to get it to work. I simply want the new_reply.htm page to show the information previously entered into the form. The page is the destination of the submit on the form page and should be referencing the page's recid, therefore, filling in any CDML tags on that page with data from the corresponding record. It just doesn't work. Is there something I need to carry over from the form itself? Something I need to add to the syntax of the submission? Any help is appreciated. Thanks!

Posted

Hi, chevell! This Q is probably better in CDML/Lasso forums but fortunately many of us hang out in all the internet forums smile.gif. In situations where I have web form for data input of some kind and need a confirmation page following it, I usually use pretty much the same exact form for the -format page as the original form except for the following 3 things:

(1) I add the <INPUT TYPE="hidden" NAME="-recid" VALUE="[FMP-CurrentRecID]"> line

(2) I add [FMP-field:fieldname] to the starting values of the field text boxes (or other types as needed)

(3) I change the SUBMIT button's text to "CONFIRM" and the action to an -edit

If you want to just show the data, I think you can just have an HTML/CDML page with [FMP-field:filename] tags to show the data by themselves. When showing data immediately after submission, you don't even need to specify recID. I use the [FMP-CurrentRecID] because it is mandatory for an -edit.

If I had to guess, I'd guess that your problem has to do with layout. If specify a layout using -lay, that layout has to have the fields you want to show or they don't show up... I've done this a number of times by accident. For a quick test, make a new layout in standard format w/all fields on it and call the layout "web". In your web form, have the

<INPUT TYPE="hidden" NAME="-lay" VALUE="web">

line in there and you should be good to go. You can remove unwanted fields from the layout later.

If that's not it, post your code (or equivalent) and we'll take a look and see if there's anything missing or typographically incorrect.

--ST

Posted

Ok, that was a no go, but I am sure its just my inexperience with this that's the problem. Here's my source:

<HTML>

<HEAD>

</HEAD>

<P><TABLE WIDTH="100%">

<TR>

<TD COLSPAN=2>

<div align="center">

<P><font face="Verdana"><img src="http://s-fmpserver02/images/bouncetheball02.jpg" width=143 height=78 border=0 align=bottom><br>

</font><font size="+3" face="Verdana"><b>Submission Recorded<br>

</b></font>

<form id="FormName" action="FMPro" method="get" name="FormName">

<input type=hidden name=-DB value="MACForm"><input type=hidden name=-Lay value="Developer View"><INPUT TYPE="hidden" NAME="-recid" VALUE="[FMP-CurrentRecID]"><br>

<b><font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif">MAC&nbsp;Number:</font><font color="red"> </font><font size="2" color="red" face="Verdana">[FMP-field:MAC Number]

</font></b>

</form>

<p><font size="2" face="Verdana"><b><br>

<br>

</b></font><font face="Verdana" size="1">You will receive an email confirmation of this request shortly.</font><font face="Verdana"><br>

<br>

<br>

</font><font face="Verdana" size="2"><a href="http://s-fmpserver02/mac" target="_parent">Back to the MAC&nbsp;Form Home Page</a></font></p>

<p><font face="Verdana" size="2"><a href="http://FIDO" target="_Parent">Back to the FIDO&nbsp;Home Page</a></font></p>

</div>

</TD>

</TR>

</TABLE></P>

<P></P>

</BODY>

</HTML>

Thanks!

Posted

Ok, still no good, but I think it must have something to do with the generic state of this line:

<form id="FormName" action="FMPro" method="post" name="FormName">

What does "FormName" reference?

Thanks!

Posted

Hi, Chevell! Thanx for posting your code. Here are a couple things you can check...

(1) syntax; I'm not sure if it makes a difference, but there are a lot of missing quotation marks around your property assignments PROPERTY="something"

(2) <FORM NAME="FormName" ACTION="FMPro" METHOD="post"> I do not now what an ID property is in a form tag, so I cannot say what it does... I'd leave it out. The NAME property just names the form so you can refer to it specifically if you have scripting on the page... I usually do not name my forms. Sometimes you have multiple forms per page and naming them can be a necessity to distinguis them if you use scripts to act on one of them.

(3) <INPUT TYPE="hidden" NAME="-recID" VALUE="[FMP-CurrentRecID]>

I don't think it hurts, but I do not think this is necessary on this page unless you are going to perform an -edit to allow someone to make changes on this page to what they entered.

(4) Ooops.. my mistake... I see that this is the code to your new_reply.htm, but I think we need the code to your web form that is submitted. The new_reply.htm does not have to have a web form at all unless you are going to do an -edit as I mentioned above. A format page follwing a data submission page (-new / -edit) can just be HTML and [FMP-field: myfield] tags. If you DO want a web form on this page, you will need to declare a -format page for it as well.

--ST

Posted

ok, so, as I thought, I just need to have the [FMP-field:MAC Number] in the results page. The form that submits to this page is huge. Here's the top of the form:

<FORM NAME="myform" onSubmit="return verify();" ACTION=FMPro METHOD=post>

<input type=hidden name=-DB value="MACForm"><input type=hidden name=-Lay value="Change - Web"><input type=hidden name="-format" value="new_reply.htm"><input type=hidden name="-error" value="new_error.htm">

This form submits just fine, its the results page that I want to display the "MAC Form" field.

Ideas? Thanks!

Posted

Hmm... I see you have some kind of JavaScript validator on there that looks suspect to me but I'm afraid I don't know JS well enough to say if it might be getting in the way. Can you take out the

onSubmit

and see if it works OK without it? The other problem may be the layout name. I've had problems with space characters before (sometimes, not consistent). Try changing the layout name to "changeweb" and then change the -lay command to match and see how it goes. Fields not being on layouts is a common reason why they don't show up and maybe it's looking for a layout called "Change%20-%20Web" or something.

--ST

Posted

Ok, removing the onsubmit javascript had no effect. Something has got to carry over the current recid from the form to the confirmation page. What normally does this? My feeling is that the confirmation page is completely detached from the process and is just a simple redirect. Help! Thanks!

Posted

The <INPUT TYPE="hidden" NAME="-recID" VALUE="[FMP-CurrentRecID]"> doesn't hurt, but it is not necessary unless you are going to an EDIT on the confirmation page. Even then, it is not executed until that 2nd form is submitted, so your [FMP-field: fieldname] tags should work fine. I think it's a permissions issue, either a -lay reference or your permissions in ACCESS PRIVILEGES or the WEB SECURITY DATABASE... any of which can deny the showing of a field value and will make something look blank.

See if you can see the data with a FIND using the same inputs.

Alas, I can only repeat that with CDML , you can have a web form with a -NEW action followed by a simple HTML page with [FMP-field: fieldname] on it and it will work fine... really... no other code is needed.

TO TEST...

(1) make a db called "newtest.fp5" and create a field called "yourname" (I also made "creationdate" and "modificationdate" w/auto data entry)

(2) change the main layout name to "web" and share the db via web companion

(3) make a folder called "newtest" in your Web folder

(4) in the "newtest" folder make a web form called "index.html" with the following code, just be sure to change "yourIPaddressordomain" to the appropriate value:

<HTML>

<BODY>

<FORM ACTION = "http://yourIPaddressordomain/newtest/FMPro" METHOD="POST">

<INPUT TYPE="hidden" NAME="-db" VALUE="newtest.fp5">

<INPUT TYPE="hidden" NAME="-lay" VALUE="web">

<INPUT TYPE="hidden" NAME="-format" VALUE="showdata.html">

<P>New Record Test</P>

<P>Enter your name :)

<INPUT TYPE="text" NAME="yourname">

</P>

<P>

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

</P>

</FORM>

</BODY>

</HTML>

(4) make another file in the "newtest" folder called "showdata.html" with the following code:

<HTML>

<BODY>

<P>Thanx!</P>

<P>Here is your name... [FMP-field: yourname]<BR>

created on [FMP-field: creationdate]<BR>

last modified on [FMP-field:modificationdate]</P>

</BODY>

</HTML>

(5) Visit http://yourIPaddressordomain/newtest/index.html, enter a name, and click on the submit button

This should work fine and show you the data just entered on the web form page. It should only take a minute or two to recreate what I described since you should be able to COPY/PASTE the code straight into those pages.

Sorry you're stuck. I'd really look at permissions/layout kinda thing or JavaScript, though, rather than worry about the -recID unless you think using JS somehow makes it required... CDML does not need it in this case.

--ST

Posted

Well allow me to jump into the fray. Garry has a point about Post vs Get, yet I do not think that is the answer here. The way this has come down is a bit convoluted so let me approach this starting with your post above (#110869 - 06/17/04 01:24 PM) where you state:

This form submits just fine, its the results page that I want to display the "MAC Form" field.

In an earlier post (#110674 - 06/16/04 02:30 PM) to which Garry made his observation, you posted code. I copied that HTML and then organized it to make it more readable. Cutting to the chase I extract:

<form id="FormName" action="FMPro" method="get" name="FormName">

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

<input type=hidden name=-Lay value="Developer View">

<INPUT TYPE="hidden" NAME="-recid" VALUE="[FMP-CurrentRecID]"><br>

<b><font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif">MAC&nbsp;Number:</font><font color="red"> </font><font size="2" color="red" face="Verdana">[FMP-field:MAC Number]

</font></b>

</form>

I gather that this code is from your new_reply.htm.

You do not use a form to get data from the FMPdb. In fact, as I looked at your form I was immediately taken that you did not have an action tag, which is necessary with a form.

Eliminate the form altogether. All you need is:

<b><font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif">MAC&nbsp;Number: [FMP-field:MAC Number]</font></b>

You might try looking at a working example. There are many of them available in the Sample Files Forum. The usually have CDML or Web in their subject line.

One other thing, do not use spaces as in ...name=-Lay value="Developer View" and the field MAC Number, as they will cause you problems. And you really need only one layout for the web solution with all the fields on it. The only one looking at this layout is the developer and the electrons.

Bon chance.

Posted

Ok, i guess I am just fully confused. Let me explain how I think this works and you can tell me what part is wrong. I have several fields in the database that are actually URLs created by calculation to take me to web pages with dynamic form data in them. I use these fields to email to users so they can see the live data in the database. Here is an example of one:

http://s-fmpserver02/sup_app/FMPro?-db=macform.fp5&-format=record%5fdetail.htm&-lay=developer%20view&-recid=33981&-find=

My understanding of this URL is that I am pointing to the server and folder where the html resides, then telling the browser to use FMP data from the database "macform.fp5" using the formating of the record_detail.htm web page and data in the developer view layout showing the particular values in the record "33981".

Having said that, what tells the browser to look for all that information on my "new_reply.htm" page? I have absolutely no permissions set on the database and the layout I am referencing is open and available, with all the fields I need showing.

I guess my point is. I can get live data out of the database using other methods, I just can't get it to display after a submit. I must be doing something wrong on the submit page. Its my only guess.

Posted

Hi, Chevell! Tuff going, eh?

RE: Having said that, what tells the browser to look for all that information on my "new_reply.htm" page?

The e-mailed URL takes visitors to record%5fdetail.htm and apparently shows data, but I don't think that has anything to do w/the page once they are there, right? On record%5fdetail.htm, I assume you are allowing users to type data into text boxes, correct? They then press the SUBMIT button to create a NEW RECORD (-new), and then they are shown the data they just entered on new_reply.htm, right?

If my assumptions/ascertations are correct, how they got to the record%5fdetail.htm page does not matter, i.e. in this case the URL does not matter. You have a form for input that will perform a -new action. On that page, you have something like...

<FORM ACTION = "http://s-fmpserver02/sup_app/FMPro" METHOD="POST">

<INPUT TYPE="hidden" NAME="-db" VALUE="macform.fp5">

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

... text fields for input; same name as your fmp db fieldnames

<INPUT TYPE="submit" NAME="-new" VALUE="Create New Record">

</FORM>

The -format line says what page should be shown after the user presses the SUBMIT button.

The new_reply.htm page can be as simple as

<HTML>

Thanx!

</HMTL>

or

<HTML>

<BODY>

Thank you for entering information. You entered... <BR><BR>

[FMP-field: fieldname1] <BR>

[FMP-field: fieldname2] <BR>

[FMP-field: fieldname3] <BR>

</BODY>

</HTML>

That's it. The -format page that immediately follows the -new web form page will have the data from the newly-created record immediately avaialable w/no additional code/stipulations required.

If you are NOT doing a -new, then that is different and you will have to explain... something like...

emailed URL takes people to record%5fdetail.htm

on record%5fdetail.htm, users enter data into text boxes, and a new record is created for that data

on new_reply.htm, users see fields they had just entered on the previous page

Hope this helps get you closer...

--ST

Posted

Well, you're partly (or mostly) right. The users go to a page, submit a new record and get a reply page, as you said. The issue is that at no point in my system do the users get a reply page with any DATA on it. It just is a static page that has "Submission Recorded". I added {FMP-Field: ...} whatever in there and its just blank, meaning to me that that page is just a static HTML page. I dunno what I'm missing. I've posted the HTML to both the submission and reply pages in the preceding posts. I guess it MUST be something I'm not doing in the submission page. GRRR!

Posted

I don't know about others, but my crystal ball has clouded over. Why don't you just give us the entire form which you submit? Perhaps we then can do better than "partly (or mostly) right".

I gather that a new record is being created in the db macform upon submission.

Posted

I've just had a look at these files. The Format file "new_reply.htm" seems OK, except for the Form which is not necessary!

So a new record is created yet the [FMP-Field:Mac Number] is not displayed!

1. Is the text "[FMP-Field:Mac Number]" displayed, or is it just blank?

2. If it is blank:

- Is that the correct name for the field?

- Is the field on the named Layout ("Change - Web"?)

- Do any security restrictions exist for the field?

- Does the field have a value?

Good Luck.

Garry

Posted

OMG! I am such a rookie! Of course the issue is that the individual layouts (I have 20 of them for each form type) did not have the MAC number. I am using a single view with all the fields for all my other web pages, but didn't bother to remember that the submission forms would be using whatever layout they are linked to. ARGH! thank you SO MUCH!

--

Chevell

Posted

Well, I'm glad it finally worked out. In my first post in this thread, though, I did say...

If I had to guess, I'd guess that your problem has to do with layout. If specify a layout using -lay, that layout has to have the fields you want to show or they don't show up... I've done this a number of times by accident. For a quick test, make a new layout in standard format w/all fields on it and call the layout "web". In your web form, have the

<INPUT TYPE="hidden" NAME="-lay" VALUE="web">

line in there and you should be good to go. You can remove unwanted fields from the layout later.

--ST

Posted

#111390 - 06/21/04 09:59 PM

"And you really need only one layout for the web solution with all the fields on it. The only one looking at this layout is the developer and the electrons." smile.gif

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