JitseSchaafsma Posted May 9, 2003 Posted May 9, 2003 I wonder is it possible to pass a token in a form submit. What i mean is this sample code: <FORM name="myform" action="http://10.0.1.2/FMPro" method="post"> <input type="hidden" name="-DB" value="medewerkers.fp5"> <input type="hidden" name="-Lay" value="L1"> <input type="hidden" name="-Format" value="check.htm"> <input type="hidden" name="-Error" value="retry.htm"> <input type="hidden" name="-Token.0" value=[FMP-Field:Naam]> Gebruikersnaam:<input type="text" name="Naam" Value="MensoMolag"><BR> Wachtwoord:<input type="text" name="Wachtwoord" Value="Menso"><BR> <input type="submit" name="-Find"> <input type="button" value="enter" onclick="inloggen()"> Through this form the user enters data into the field Naam Now i want to have this data directly copied into a Token.0. is this possible (the sample code does not work) Thanks for any suggestions Jitse
Leb i Sol Posted May 9, 2003 Posted May 9, 2003 <input type="hidden" name="-Token.0" value=[FMP-Field:Naam]> it is "attempting" to set the token = to field. What you need is to set the token = field before it reaches this form. On your posted page then you would use <input type="hidden" name="-Token.0" value=[FMP-CurrentToken:0]> now go get lucky
Unable Posted May 9, 2003 Posted May 9, 2003 "What you need is to set the token = field before it reaches this form." But since you are relying upon the client to enter this information in the form, then you need to consider the possibility of using a META Refresh between your form.htm and your check.htm as the place to capture/define the token.
Leb i Sol Posted May 9, 2003 Posted May 9, 2003 "But since you are relying upon the client to enter this information in the form, " not really...you can always use inline action and set the token=field_name and then "insert" that token into a hidden field of a form that is Sure to pass it since the user will not be entering the token information good luck_
Unable Posted May 10, 2003 Posted May 10, 2003 I was basing my response on the original query which said, "Through this form the user enters data into the field Naam...". With that in mind I did not presume to redesign the solution but to suggest a way to make the solution work based on the desired use of the form.
JitseSchaafsma Posted May 12, 2003 Author Posted May 12, 2003 Thanks for all the suggestions. Indeed i have now used inline action on a new page. So what happens is this 1] user submits the form 2] If information is correct then enters a new page with appropriate inline code to set the tokens 3] Then automaticly the user is forwarded to another page. This solution has a disadvantage that an additional page has to be processed only for filling the tokens. Anyway it works Jitse
Leb i Sol Posted May 12, 2003 Posted May 12, 2003 I am blind *sometimes ....but it looks like he figured it out
Garry Claridge Posted May 12, 2003 Posted May 12, 2003 You could always use a bit of Javascript For example: document.myform.elements["-token"].value = document.myform.Naam.value ; All the best. Garry
cinolas Posted May 30, 2003 Posted May 30, 2003 Are you guys saying that it is possible to set many differnet token ?? as in : <input type="hidden" name="-Token.0" value=[FMP-Field:SomeField]> <input type="hidden" name="-Token.1" value=[FMP-Field:SomeOtherField]> Can I really do that and have token.0 contain one piece of information and token.1 another piece of info ? If so, what is the limit ? (how many token can I use ?) This could be REALLY usefull to me ! I always found one token to be very limitting If not, what is the purpose of the .0 after the -token tag ? Cheers
cinolas Posted May 30, 2003 Posted May 30, 2003 OK ! I just answered my own questions. http://www.filemakertoday.com/cdml/cdml_using_multiple_tokens.htm YE ! Thanks anyway !
Unable Posted May 31, 2003 Posted May 31, 2003 And that is what reading the CDMLRD will tell one. What a coincidence!
Recommended Posts
This topic is 7887 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