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.

Making choices to access different result page?

Featured Replies

Hi:

In our system, firstly, I used a form to ask the user to type in the "Doctor Name" then use "Submit" button. I used:

code:


...

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

<INPUT TYPE="hidden" NAME="-Token" VALUE=[FMP-field: Doctor_Name]

...

<INPUT TYPE="text" name="Doctor_Name" size="40">

<INPUT TYPE="submit" name="-find" value="Find Records">

Then at choice.htm, I want to let users make choices to see different records. I used

code:


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

<INPUT TYPE="hidden" NAME="-format" VALUE="?">

<INPUT TYPE="hidden" NAME="-Token" VALUE="[FMP-field: Doctor_Name]">

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

...

<INPUT TYPE="radio" name="Choice" value="A"> A

<INPUT TYPE="radio" name="Choice" value="B"> B

[FMP-if: Choice.eq.A]

[FMP-Include: aret.htm]

[FMP-else]

[FMP-Include: bret.htm]

[/FMP-if]

<INPUT TYPE="submit" name="-Find" value="Submit">

Obviously, it doesn't work! My problems are:

1. I want the user to choose Option A & B so as to access to different format page, but how can I fill out this?

<INPUT TYPE="hidden" NAME="-format" VALUE="?">

2. "Choice" is like a valuelist, do I need to create it in FileMaker database?

3. I wonder whether there are other mistakes in the code?

Thanks a lot in advance!

Catty

Consider putting the if conditional on the format file "?". (Darn strange name)

  • Author

It still doesn't work with Keith's suggestion. Any other solutions?

Thanks in advance!

Catty

Keith recommendation is OK, it should work.

Your logic at choice.htm is wrong. You can do the IF in result page after visitor pick the choice and submit the page, not without sending the request -- as Keith suggested smile.gif

  • Author

Thanks for the reply!

Maybe I make sth confusing! What I mean is follows:

Option A has the format file: aret.htm

Option B has the format file: bret.htm

So I don't know what should be the substitute of "?" in choice.htm (I mislead people there)

<INPUT TYPE="hidden" NAME="-format" VALUE="?">

Another question is: whether I need to create a valuelist for "Choice", which has the values "A" and "B"?

Thanks!

Catty

From the beginning:

The results page for the "Doctors" listing allows the user to select particular types of reports to view. Use this for the users selection:

code:


<INPUT TYPE="radio" name="-token.1" value="A"> A

<INPUT TYPE="radio" name="-token.1" value="B">B

Assign the selection to a token. Do the usual "find" then at the begining of the resulting format page have the if statements (no other cdml/html):

code:


[FMP-if: currenttoken:1.eq.A]

[FMP-Include: aret.htm]

[FMP-else]

[FMP-Include: bret.htm]

[/FMP-if]

Hope this is what you are after.

Garry

[ February 21, 2002, 06:18 PM: Message edited by: Garry Claridge ]

  • Author

Thanks very much, Garry!

I tried today and it works! It is exactly what I want!

Thanks again for telling me how to use [FMP-Include] tag.

Best Regards

Catty

Keith told you that as well smile.gif

You can write the code to the page and include it within IF statement or just include proper page on that correct IF spot.

  • Author

Yes, I should thank for the helps from Keith and Anatoli too!

I greatly appreciate the prompt responses/suggestions from the people in the cyber FileMaker space. Without your real-time help, I have had been "killed" by CDML, or by boss...

Best Regards

Catty

Please, ask more question so we can save you from your boss anger smile.gif

  • Author

I will!

Catty

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.