July 19, 200223 yr Hi, Just a question about displaying a selected checkbox on a search results page. I am using a value list to hold the values. When the value list is displayed online, it is in the form of checkboxes. When the user searches for his/her records, and then sees the search results on the search page, how do I display which checkbox the user has selected? I know to display other fields, such as name, it would be [FMP-Field: FirstName], so forth and so on. I just don't know how it works for value lists displayed as check or radio boxes. Thanks for any insight, Cristy
July 19, 200223 yr Check [FMP-ValueList], [FMP-ValuelistItem] and [FMP-ValueListChecked] in the "CDML Reference" database. It gives a good example of how this works. All the best. Garry
July 19, 200223 yr It is good to have choices. In addition to Garry's advice, you can also place a field formatted as a valuelist on one layout on another layout where you can format the same field as standard. You can then access that data with the fmp-field tag should you choose to do so. And you can use the break encoding for design purposes.
July 24, 200223 yr Hi, here's the CDML code I've been using for checkboxes on search results/record detail pages, where you define the values manually. This one has the advantage that the checkbox name can be different from the value list. <input type="checkbox" name=fieldname value="field value1" [fmp-if:FIELD:fieldname .eq. field value1]CHECKED[/FMP-IF]> ......you then repeat it for each value of the checkbox. BEWARE: If you pick up this bit of code from the FileMaker reference the example doesn't have the "" around the field value, so it doesn't work. To pick up all the values from FileMaker: [FMP-VALUELIST: fieldname, LIST=listname] <INPUT TYPE="checkbox" NAME="fieldname" VALUE="[FMP-ValueListItem]"[FMP-ValueListChecked]>[FMP-VALUELISTITEM: Always, HTML] [/FMP-VALUELIST] ....this second one build the checkboxes dynamically from the value list so you don't have top go back and change the html when the list changes. regards, jeff
Create an account or sign in to comment