[FX.php List] checkboxes

Erik Andreas Cayré erik at cayre.dk
Sat Oct 21 05:11:04 MDT 2006


Den 21/10/2006 kl. 10.49 skrev Gjermund Gusland Thorsen:

> an unchecked checkbox will not be sent on the form neither as
> formFieldName= or ""
> If a check box is unchecked not even the name of that checkbox will be
> sent to the next page.
>
> So all checkbox names should be parsed on the parsing page,  
> something like this:
> if( isset( $_REQUEST['myStatusField'] ) ) {
> $q->AddDBParam( 'myStatusField', $_REQUEST['myStatusField'] );
> } else {
> $q->AddDBParam( 'myStatusField', '0' );
> }

Yes, that's exactly what I meant. Sorry if it wasn't obvious; thx ggt

The point here is that if you need to be able to 'uncheck' the field  
in FM using a web-form, you must do some extra work as described by ggt.
If only ever need the field to be 'checked', and never cleared, then  
all is good, and you don't need to worry!

I hope I got it right this time;-)

---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1856 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20061021/da607312/smime.bin


More information about the FX.php_List mailing list