May 9, 200322 yr 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
May 9, 200322 yr <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
May 9, 200322 yr "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.
May 9, 200322 yr "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_
May 10, 200322 yr 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.
May 12, 200322 yr Author 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
May 12, 200322 yr You could always use a bit of Javascript For example: document.myform.elements["-token"].value = document.myform.Naam.value ; All the best. Garry
May 30, 200322 yr 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
May 30, 200322 yr OK ! I just answered my own questions. http://www.filemakertoday.com/cdml/cdml_using_multiple_tokens.htm YE ! Thanks anyway !
Create an account or sign in to comment