Jump to content

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

Recommended Posts

Posted

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

Posted

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.

Posted

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

This topic is 8221 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.