[pmwiki-users] Checkboxes for updating PTVs

Simon nzskiwi at gmail.com
Sat Dec 20 19:13:21 CST 2014

Thanks for sharing.
It would be really appreciated if you would dd your information to the wike

On 20 December 2014 at 23:11, kirpi at kirpi.it <kirpi at kirpi.it> wrote:

> I recently wanted to adopt some checkboxes in a form derived from Fox
> Contacts.
> Such a form is used both for entering and updating data.
> My idea was to have some switches, some easy to use Yes/No fields,
> with an immediate "boolean" feeling of On/Off useable for setting and
> updating PTVs.
> Radio buttons were not interesting as I felt they were better suited
> for "real" values (Male/Female) and also they are less compact.
> Moreover, I had problems setting defaults values, whereas checkboxes
> have a "natural" zero value as a start.
> I tried but failed to have them working.
> Thanks to Hans, I then learned that checkboxes only send a value if
> checked, whereas they send just nothing when not checked. This way,
> there is no way to update/zero an already set value just by unchecking
> a checkbox.
> After some attempts, we found that there is an easy and well-working hack
>     (:input hidden $:abc 0:)
>     (:input checkbox $:abc 1:)
> It is perhaps well known, or perhaps not.
> So, I just wanted to share it
> :-)
> Thanks!
> Luigi
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20141221/b0d35fbf/attachment.html>

More information about the pmwiki-users mailing list