[pmwiki-users] Multiple checkboxes

kirpi at kirpi.it kirpi at kirpi.it
Wed Sep 30 17:06:09 CDT 2015


I want to thank Petko for his prompt and detailed help.
As well as for his steady involvement in pmwiki development.
Thank you Petko, really!

Also, Hans' new enhancements of Fox made a big difference, as forms
can be handled and processed in a very flexible way.

So, as I adopt Fox, I ended up to have:

(:input default $:Hobby[] {(foxfixptv $:Hobby)}:)
(:input checkbox $:Hobby[] Travels:) Travels
(:input checkbox $:Hobby[] Photography:) Photography
(:input checkbox $:Hobby[] Music:) Music

which works flawlessly and, depending on a simple Fox variable in
config.php, is able to save as:

Hobby: Travels Photography Music
or
Hobby: Travels,Photography,Music
or
Hobby: Travels, Photography, Music
or
Hobby: Travels + Photography + Music

or any other suitable separator.

Moreover, this setting is backward compatible, that is if a wiki
already has PTV arrays written with a certain separator (be it space,
comma or any other), it properly sets the relevant checkboxes on edit,
and saves in any chosen format, without breaking the system.

Thanks Petko, once more!
And thanks Hans, again!

:-)
Luigi



More information about the pmwiki-users mailing list