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.

Checkboxes or radio buttons in update page.

Featured Replies

I've tried every solution I can find to get either check boxes or radio buttons working on a record update page using CDML but nothing works.

In any case, is there a trick to getting values in a record to display correctly in a record detail page using radio buttons? Also, can I make them update-able?

I can get the radio buttons working fine in the new record page but no joy in the update page. I am using a value list.

Is it my imagination or does CDML do a fantastic job at text files, pop-ups and text area fields but stinks at radio buttons and checkboxes? Am I to assume that this is a serious flaw with CDML as I have yet to find a workable solution?

Here is my update page code. The field name is "cam" and the valuelist is "noyes" with values of No and Yes in that order.

[FMP-ValueList: cam, list=noyes] <input type="radio" name="cam" value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP- valueListItem] [/FMP-ValueList]

I have tried the solution fro checkboxes on the filemaker site for this but it one only works once. It fails to diplay the correct value on subsequent updates to the record.

Thanks in advance!!! (Again)

"... stinks at radio buttons and checkboxes? Am I to assume that this is a serious flaw with CDML as I have yet to find a workable solution?"

The answers to your queries may depend upon your understanding.

CDMLRdb:

Check Boxes

What it does

An HTML input type. Used by a browser to display checkbox(es).

This is not a FileMaker Pro tag, This is standard HTML.

Do not include calculation or summary field types on add or update format files, as data can't be entered into these field types.

Radio Buttons

What it does

An HTML input type. Used by a browser to display a radio buttons.

This is not a FileMaker Pro tag, This is standard HTML.

Do not include calculation or summary field types on add or update format files as data can't be entered into these field types.

Here is a Javascript method:

<script>

if ('[FMP-Field:gender]' == 'm') {

document.write('Male <input type="radio" value="m" name="gender" checked >');

document.write('Female <input type="radio" value="f" name="gender" >');}

else {

document.write('Male <input type="radio" value="m" name="gender" >');

document.write('Female <input type="radio" value="f" name="gender" checked >');

}

</script>

CDML [FMP-If] statements can also be used:

Male <input type="radio" value="m" name="gender" [FMP-If:gender.eq.m]checked[/FMP-If] >

Female <input type="radio" value="f" name="gender" [FMP-If:gender.eq.f]checked[/FMP-If] >

Good Luck.

Garry

Are the fields getting updated in FM?

Maybe the problem is with displaying on next page.

For that I did the condition IF Yes -- display yes ELSE -- display no.

The CDML that you are using should be OK. I think something else is wrong.

As Anatoli suggested, other issues may exist.

All the best.

Garry

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.