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.

Featured Replies

I have an html form with checkboxes that update fields in my database.

Here's my code:

[FMP-Valuelist:Answer_a,List=A]

<input type="checkbox" name="Answer_a" value="[FMP-ValueListItem]"

[FMP-Valuelistchecked]>

[/FMP-Valuelist]

When a checkbox is checked it updates the database. The problem is that when I uncheck the checkbox it stays checked.

How do I make it stay unchecked?

Cheers,

Mike

  • 2 weeks later...

Mike, have you considered writing a script which would use the code line "Clear [field name]" and which would be activated from your form action or link? Don't know that this will help with your structure, but it might be worth looking into.

Peace

Keith M. Davie

  • 5 weeks later...

You don't need no steekin' scripts! Just use the correct code to make it happen for you in the first place.

Here is the whole kit-and-caboodle. in the example, the value list's name is "Discussion" and the field that it is associated to ois also called "Discussion."

[FMP-VALUELIST: Discussion, LIST=Discussion]

<INPUT TYPE=checkbox NAME=Discussion VALUE="[FMP-ValueListItem]"[FMP-ValueListChecked]>[FMP-VALUELISTITEM: Always, HTML]<BR>

[/FMP-VALUELIST]

The trick here is the [FMP-ValueListChecked] CDML code, it does all of the magic for you.

  • 1 month later...

Nope, this still doesn't do it. I have the same problem with checkboxes that stay checked in the database. Is there something we haven't considered thoroughly?

  • 2 weeks later...

The mystery has been solved!

And it works smile.gif The only thing you have to modify (at least I did, try for yourself) is not to include the field name as an attribute in the input tag, which is contrary to FileMaker Inc.'s suggestion.

Edit: referred to the original source.

[This message has been edited by Pegges (edited October 17, 2000).]

  • 4 weeks later...
  • Newbies

For me the mystery was uh . . . nearly solved.

This particular problem is a bit of a nightmare. The info FileMaker support offers is incorrect and Pegges valiant attempt to correct that info did me no good. On a whim, I tried the following, and it worked! You mileage may vary.

Do indeed include the hidden input (as FM support suggests), HOWEVER, do not leave the value empty, DO INCLUDE the value list. Also, get rid of the "size=30" (it's hidden for goodness sake).

The final code would look like the following. I really hope this helps someone, it was such a pain to figure out :-)

<INPUT TYPE=hidden NAME="YES_NO_FIELD" VALUE="YES_NO_LIST">

[FMP-VALUELIST: YES_NO_FIELD, LIST=YES_NO_LIST]

<INPUT TYPE=checkbox NAME='YES_NO_FIELD' VALUE='[FMP-ValueListItem]'

[FMP-ValueListChecked]>[FMP-VALUELISTITEM: Always, HTML]

[/FMP-VALUELIST]

------------------

~Andrew~

[This message has been edited by rhygin (edited October 26, 2000).]

Mystery is no more!

Thanks for all the input, people. rhygin's last post solved the puzzle for me.

This is great! Thanks for the help...I've been killing myself over this for a week.

-Don

[This message has been edited by braman (edited October 27, 2000).]

  • 2 weeks later...

quote:

Originally posted by rhygin:

I really hope this helps someone, it was such a pain to figure out :-)


Thanks for the sacrifice, Rhygin: your sample code helped me out immensely.

[ November 14, 2001: Message edited by: The Bridge ]

The checkbox problem is widespread. FMpro is not the only server to have to deal with this horrible cludge. The "lack of content" associated with turning off a checkbox is dealt with by both browsers - as well as by commercial web server - in many crappy and cludgy manners... loading the cgi stream with hidden input is usually the solution.

out of curiousity: did the above solution work with both browsers??

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.