[pmwiki-users] Multiple checkboxes
Hans Bracker
design at softflow.co.uk
Tue Sep 22 11:51:53 CDT 2015
> I believe Fox was also updated to handle those.
> The current way to do this would be to set multiple default values,
> separated by spaces, like:
> your PageTextVariable (PTV):
> (:Hobby:Travels Music:)
The update to fox.php consisted in removing a now redundant
custom InputDefault function.
For adding and updating PTVs from a form with array elements as input
Fox has always posted the array as a list of comma-sperated values.
so in this example form
(:foxmessages:)
(:fox frm ptvtarget=Main.WikiSandbox ptvfmt=text:)
(:input default $:Hobby[] {$:Hobby}:)
(:input checkbox $:Hobby[] Travels:) Travels
(:input checkbox $:Hobby[] Photography:) Photography
(:input checkbox $:Hobby[] Music:) Music
(:input submit post:)
(:foxend frm:)
multiple input box ticking results in a PTV looking something like this:
Hobby: Travels,Photography,Music
which then would not populate input defaults correctly, ie. it needs
spaces between values not commas!
How can we resolve this? I could add a Fox config variable
"$FoxPTVArraySeparator", which could be set to a comma or a space or
even a comma and a space or what ever. I am not sure what a change in
the default from comma to space would break for sites updating
fox.php.
Could PmWiki have a similar configuration variable, so instead of a space
a comma could be used in a PTV holding array elements?
Best regards,
Hans
mailto:design at softflow.co.uk
www.softflow.co.uk
More information about the pmwiki-users
mailing list