Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

<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 laugh.gif

"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.

"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_

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.

  • 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

I am blind *sometimes smile.gif

....but it looks like he figured it out

You could always use a bit of Javascript smile.gif

For example:

document.myform.elements["-token"].value = document.myform.Naam.value ;

All the best.

Garry

  • 3 weeks later...

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 laugh.gif

If not, what is the purpose of the .0 after the -token tag ?

Cheers

You have 10 tokens, 0 to 9.

And that is what reading the CDMLRD will tell one. What a coincidence!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.