Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

checkbox in a found record????

Featured Replies

  • Newbies

I have a search form for a database and when a user finds a record they can view the form but I can't get the checkboxes to work. In the submission form each checkbox is next to a picture of nice anti-aliased text. In the results form this does not work, all the examples I can find use the form :

[FMP-valuelist: iiCOLOR] <input type="checkbox" name="RGB" value="[FMP-valuelistitem]" [fmp-valuelistchecked]>[FMP-valuelistitem]</font>

<p><font size="2">[/FMP-valuelist] <input type="checkbox" value="RGB" name="iiCOLOR">

is there is a way to set up a checkbox that is standalone and not part a list of checkboxes? Does that make sense? I want to set up each checkbox indivdualy and not as part of a repeating section of code

You want to "hard code" the check box options ointo the html format field rather than use the [FMP-ValueList] CDML stuff?

Yes (he says slowly) that should work <rubs chin in contemplative manner>

You'll have to completely forgo the value list and type the whole thing in yourself. This means that the list on the web page will need to updated by hand every time the value list changes...

try typing this:

<input type="checkbox" name="RGB" value="AAAA"><img src="antialiasedtextA.jpg><br>

<input type="checkbox" name="RGB" value="BBBB"><img src="antialiasedtextB.jpg><br>

<input type="checkbox" name="RGB" value="CCCC"><img src="antialiasedtextC.jpg>

I've found that checkboxes and radio buttons only appear correctly in the browser if they are in a valid FMP-Form on the format file.

Try that and see if it works. note that you have lost the ability for FMP to generate the options based on the value list.

  • Author
  • Newbies

I have that part worked out. The problem is that there is a search page where you can look up records that have already been entered. on the results page after the search the checkboxes don't seem to work. If I put in normal fields they show up fine but the checkboxes don't. All of the examples show cycling throught the value list. What I want to do is layout the page so that if a checkbox will be checked if that value is in the value list.

This is where the [FMP-Option] CDML tags automatically work it out for you, but your solution cannot use them.

Instead you're going to have to do it all by hand, using [FMP-If] loops. It'll all be hard-coded into the html so changing value lists later is going to be a major (not just big) job.

[FMP-If: RGB.cn.AAA]

<input type="checkbox" name="RGB" value="AAAA" checked><img src="antialiasedtextA.jpg><br>

[FMP-Else]

<input type="checkbox" name="RGB" value="AAAA"><img src="antialiasedtextA.jpg><br>

[/FMP-If]

The difference here is the "checked" option if the value is present. The .cn. (contains) operator is needed because the checkboxes allow the selection of multiple options not just one. If it was radio buttons then .eq. could be used but .cn. would work too.

It's starting to look pretty complicated. I hope you are documenting this so you'll be able to change it in six months time.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.