ibiubu Posted September 30, 2002 Posted September 30, 2002 Been reading the CDML reference guide as well as posts here. I am still a little lost on checkboxes. What I was trying to do was include a checkbox in my form layout on my web page. The checkbox on my filemaker layout is a simple "Yes" checkbox. I want the checkbox on my html form layout to show up as checked if it is checked in FileMaker, and to not show up as checked on the web page if it is not checked in FileMaker. I have played around with some code (the checkbox is part of a table) <tr> [FMP-ValueList: specs images, List=Yes] <td width="234"> <div align="right"> <input type="checkbox" name="specs images" value="[FMP-ValueListItem]"> </div> </td> [FMP-ValueListChecked]>[FMP-ValueListItem][/FMP-ValueList] Not quite getting the results I am after. Anyone with some thoughts or helpful suggestions? LR
Anatoli Posted September 30, 2002 Posted September 30, 2002 Use IF ELSE ENDIF Exactly the same logic as you just describe.
ibiubu Posted September 30, 2002 Author Posted September 30, 2002 Sorry, I dont quite follow where I would include the IF Else and the End If? LR
Garry Claridge Posted September 30, 2002 Posted September 30, 2002 Larry, Should be like this: <tr> [FMP-ValueList: specs images, List=Yes] <td width="234"> <div align="right"> <input type="checkbox" name="specs images" value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP-ValueListItem] </div> </td> [/FMP-ValueList] Give that a go. All the best. Garry
ibiubu Posted September 30, 2002 Author Posted September 30, 2002 Ok, as suggested I used the above: <tr> [FMP-ValueList: specs images, List=Yes] <td width="234"> <div align="right"> <input type="checkbox" name="specs images" value="[FMP-ValueListItem]" [FMP-ValueListChecked]> </div> </td> [/FMP-ValueList] I did leave off the [FMP-ValueListItem] since It generated a text string "Yes" next to my checkbox which I did not need. Now this works and shows the item checked in my form if it is checked in FileMaker. Question: the form this sits in has a submit changes button at the bottom. All the other text fields in the form work when I hit submit changes. But if I try to uncheck the checkbox and submit changes...it does not make the change to the box in FileMaker. Not quite sure why? LR
Garry Claridge Posted September 30, 2002 Posted September 30, 2002 I think you may need to add this line to the form: <input type="hidden" name="specs images" value=""> Hope this works. Garry
ibiubu Posted October 1, 2002 Author Posted October 1, 2002 Yikes! Finally got it to work. Ended up with a page with a lot of checkboxes. Talk about some hairy cdml code. Dont think we will be doing much more of the solutions that include checkboxes. LR
Recommended Posts
This topic is 8190 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 accountSign in
Already have an account? Sign in here.
Sign In Now