This is standard HTML form behavior and not OpenBD specified.  Simplest way
to deal with this is to check that the form element exists <cfif
structkeyexists(form,"offen") and form.offen eq "on"> ... it was checked
... </cfif>

There are other techniques, including adding a hidden input, but checking
existence for checkboxes is the best way.


On Tue, Dec 18, 2012 at 1:28 PM, Frank Werner <[email protected]>wrote:

> Hello,
>
> the following code manages a checkbox (hopefully :-)):
>
>             <!--- Öffentlich oder Privat? --->
>             SICHTBARKEIT:<br>
>             <cfinput type="checkbox" name="Offen"
> checked="#Selected_Record.Offen#">Dieses Projekt ist ÖFFENTLICH
> sichtbar<br><br>
>
> The content of "Selected_Record.Offen is either "yes" or "no" (without the
> quotemarks, a mysql TINYTEXT). If it is "yes" the checkbox
> appears checked. If it is "no" OpenBD fires a bug ("form.offen doesn't
> exist.") at the evaluation later on:
>
>           <cfif form.offen   eq "on">
>             <cfset variables.offen = "yes">
>           <cfelse>
>             <cfset variables.offen = "no">
>           </cfif>
>
> Does anybody have a hint? I am searching and searching..
>
> Thanx in advance
>
> Frank
>
>
>
>  --
> online documentation: http://openbd.org/manual/
> http://groups.google.com/group/openbd?hl=en
>

-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

Reply via email to