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.

A little lost on checkboxes

Featured Replies

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)B)

<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

Use IF ELSE ENDIF smile.gif Exactly the same logic as you just describe.

  • Author

Sorry, I dont quite follow where I would include the IF Else and the End If?

LR

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

  • Author

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

I think you may need to add this line to the form:

<input type="hidden" name="specs images" value="">

Hope this works.

Garry

  • Author

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

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.