June 25, 200124 yr Help. I have a page called new.htm . A person enters their street address and zip code (two fields in a database) and then clicks OK. I have code on this page as follows: <P><FORM ACTION="FMPro" METHOD="post"> <P> <INPUT TYPE="hidden" NAME="-Db" VALUE="StreetChecker3.fp5"> <INPUT TYPE="hidden" NAME="-Lay" VALUE="CGI"> <INPUT TYPE="hidden" NAME="-format" VALUE="new_reply.htm"> <INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm"> <INPUT TYPE="hidden" NAME="-token.1" VALUE="yes"> <INPUT TYPE="hidden" NAME="-token.2" VALUE="maybe"> <INPUT TYPE="hidden" NAME="-token.3" VALUE="no"> <CENTER><TABLE BORDER=0> <TR> I am trying to set some token values for use on down the line when some secondary searches will have to take place. In the format file called new_reply.htm I have some code to show me the value of the tokens only so I can see if they are being set properly. <P><FONT SIZE="-1" FACE="Arial"><B> Thank -you! Token 1 equals [FMP-CURRENTTOKEN:1], token 2 equals [FMP-CURRENTTOKEN:2], token 3 equals [FMP-CURRENTTOKEN:3] . Setting tokens to TEXT values as shown above, seems to work and they pass to the format file OK. But if I try to use a FIELD value like this: <INPUT TYPE="hidden" NAME="-token.1" VALUE="[FMP-FIELD:FullTextParserB]"> <INPUT TYPE="hidden" NAME="-token.2" VALUE="maybe"> <INPUT TYPE="hidden" NAME="-token.3" VALUE="no"> then the text values still pass but the field value shows nothing. 1. I had to fool around a bit with my IE version 5 to check for newer versions of stored pages in order to get the text values to show up. 2. I added: <INPUT TYPE="hidden" NAME="-Db" VALUE="StreetChecker3.fp5"> <INPUT TYPE="hidden" NAME="-Lay" VALUE="CGI"> to new_reply.htm too thinking that I needed it perhaps. 3. I started editing my pages using WordPad to strip out some of that funky HomePage stuff too. 4. I tried using a field value that was NOT a calculated value. No luck. Am I missing something obvious?
June 26, 200124 yr Your first file, i.e. the one with the form, needs to be called by another file with a' -find', or similar tag. This is so the 'field' replacement tag can be assigned a value before it get to the browser. All the best. Garry
June 28, 200124 yr Author My first form, NEW.HTM, is where a person enters the data for the new record. It is a starting point so it can't really be called from anywhere (right?) Then the person clicks an OK button that has this action under it: <INPUT TYPE="submit" NAME="-New" VALUE="OK"> With this action, the second form, NEW_REPLY.HTM, comes up and currently the CURRENTTOKEN tag is not assigned or showing a field value (just the text values that I passed as a test) . Do you mean that I have to "find" the address that someone just entered using a "jump page" or something? If so, would you be able to give me some guidance how that theory and code goes? Thanks.
June 29, 200124 yr You can assign tokens from existing record in database. Not before. So your second page will say: OK you are John and field name (John) can be put in the same moment to token.
July 2, 200124 yr Use a page like this to start with: <body on..load="javascript:document.startfm.submit();"> <form name="startfm" action="FMPro" method="post"> <input type="hidden" name="-db" value="StreetChecker3.fp5"> <input type="hidden" name="-lay" value="CGIfields"> <input type="hidden" name="-format" value="get_street.html"> <input type="hidden" name="-findall"> </form></body></html> The "on..load" should be "onload". I needed to do that so it would display. Hope this helps. Garry
July 10, 200124 yr Author I have experimented, and as Anatoli suggests, it seems as if I can set tokens from a second page once the record exists. The first or initial page is where a person enters the data for a new record and clicks OK. Then it jumps to a second page where the token are set. The user clicks on an OK button here to go to a third page so that I can get those tokens set. (I really do not want that step of clicking the OK button though --- any automatic way to do this? (meta tag)?) Ideally, I would really like to be able to set tokens from the initial page, but is that impossible? Garry, your responses to me seem to suggest that in loading the first page using java, it is possible. If so, what is the logic? Grabbing new record data somehow on first page?
July 10, 200124 yr The first page, as I have shown, can be very simple. You can have it findany record,or all, use '-findall' as the action tag. <form ..... . . <input type="hidden" name="-findall> </form> </body></html> Use 'onload', in the body tag with the simple Javascript to submit the form. This page will not be obvious to the user and loads very quickly. FMP needs to have a format file called before it can load the Replacement-Tags, such as [FMP-Field:xxxx] etc. Hope this helps. Garry [ July 10, 2001: Message edited by: garrycl ]
Create an account or sign in to comment