February 21, 200223 yr 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
February 21, 200223 yr Consider putting the if conditional on the format file "?". (Darn strange name)
February 22, 200223 yr Author It still doesn't work with Keith's suggestion. Any other solutions? Thanks in advance! Catty
February 22, 200223 yr 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
February 22, 200223 yr 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
February 22, 200223 yr 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 ]
February 23, 200223 yr 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
February 23, 200223 yr Keith told you that as well You can write the code to the page and include it within IF statement or just include proper page on that correct IF spot.
February 23, 200223 yr 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
Create an account or sign in to comment