Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8377 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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 ]

Posted

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

Posted

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

This topic is 8377 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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