numero = 19232
interpreted = N
texte = >>>>>[theField]=1]CHECKED[/showif]>>>>>>>For whatever is processing this form, if the checkbox is checked, >>>theField = 1. If it's not checked, the value will be undefined, so >>>theField = [theField]. You may want to filter out these undefined >>>values before adding them to your database.>>>>That is the problem, how do I filter these undefined values during a >>[REPLACE] action? This means adding an intermediate page to filter all >>this garbage. There must be an easier way to do it...>>You wouldn't need an intermediate page, just a [showif] in your [replace] >context. For example:>>[replace db=product.db&eqSkuData=[someSKU]]theField=[showif >[theField]=1]1[/showif][/replace]>>And even this wouldn't be necessary for your form as shown above to check >its checkboxes properly. If the checkbox hasn't been checked, the literal Even though you logic sounds good to me,does not work, at least for me.I have added at the end of the form:INPUT TYPE=hidden NAME=theField VALUE=0>and the combination of BOTH does work properly in all cases. Let's just hope that newer browsers don't start changing the order of form fields..._______________________________________________________________Institut Balear de Comunicacions, S.L.Gremio Tejedores 22, 107009 Palma de Mallorca, Spain_____________________________________________Tel: +34 971.43.12.77Fax: +34 971.43.08.18 E-mail: ckefauver@ibacom.esURL: http://www.ibacom.es/_____________________________________________Public PGP signature (Clave publica PGP):http://www.ibacom.es/PGP/kefauver.txt_______________________________________________________________
Associated Messages, from the most recent to the oldest:
>>>>>[theField]=1]CHECKED[/showif]>>>>>>>For whatever is processing this form, if the checkbox is checked, >>>theField = 1. If it's not checked, the value will be undefined, so >>>theField = [theField]. You may want to filter out these undefined >>>values before adding them to your database.>>>>That is the problem, how do I filter these undefined values during a >>[replace] action? This means adding an intermediate page to filter all >>this garbage. There must be an easier way to do it...>>You wouldn't need an intermediate page, just a [showif] in your [replace] >context. For example:>>[replace db=product.db&eqSkuData=[someSKU]]theField=[showif >[theField]=1]1[/showif][/replace]>>And even this wouldn't be necessary for your form as shown above to check >its checkboxes properly. If the checkbox hasn't been checked, the literal Even though you logic sounds good to me,does not work, at least for me.I have added at the end of the form:INPUT TYPE=hidden NAME=theField VALUE=0>and the combination of BOTH does work properly in all cases. Let's just hope that newer browsers don't start changing the order of form fields..._______________________________________________________________Institut Balear de Comunicacions, S.L.Gremio Tejedores 22, 107009 Palma de Mallorca, Spain_____________________________________________Tel: +34 971.43.12.77Fax: +34 971.43.08.18 E-mail: ckefauver@ibacom.esURL: http://www.ibacom.es/_____________________________________________Public PGP signature (Clave publica PGP):http://www.ibacom.es/PGP/kefauver.txt_______________________________________________________________
Charles Kefauver
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...