[pmwiki-users] Checkboxes for updating PTVs
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
> 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
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-users