Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8850 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

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

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

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

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
Posted

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).]

Posted

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

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 ]

Posted

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??

This topic is 8850 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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