Skip 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.

Simple question about check boxes...

Featured Replies

I am trying to include a simple check box on one of my forms. Basically I want it to return a value of 1 if it is checked, and no value, or a value of 0 if it is not checked. The CDML reference guide had an example...

<input type="checkbox" name="Country" value="F1">France

But I dont quite get how to change it to fit my needs. I assume in the example above that if the box is checked then F1 is input into the FM field called "Country."

So If I want a 1 to appear in my field if it is checked would it be something like this:

<input type="checkbox" name="FieldName" value="1">0

LR

You can have a second Checkbox with the value of 0. For example:

<input type="checkbox" name="FieldName" value="1">Yes

<input type="checkbox" name="FieldName" value="0">No

Note that the Fieldname is the same for both Checkboxes.

Alternatively, you can use some Javascript to check and "clear" the value before the form is submitted to FM.

All the best.

Garry

  • Author

OUCH! You must be kidding. There is no way of using a simple check box or a radio box, that when checked, and then when submit is selected in the form, will send a 1 to that field in FM?

LR

Larry,

A single box will do that, however unchecking the box will not clear the value. Try this:

<input type="hidden" name="MyField" value="">

<input type="checkbox" name="MyField" value="1">0

A couple of god threads exist on this subject. I will do a search to familarise myself on what so of the outcomes where.

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.

Account

Navigation

Search

Search

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.