[pmwiki-users] Fox Form and PTV - Help a Newbie

Hans design5 at softflow.co.uk
Tue Sep 9 04:17:56 CDT 2008

Monday, September 8, 2008, 9:41:33 AM, Graham Archer wrote:

>  (:fox D4GoLiveForm ptvtarget=MgmtOps.Test template=0 redirect=1:)
>  [+Current Status:+](:input select {$:colour} "":)(:input select
> {$:colour} "Red":)(:input select {$:colour}  "Yellow":)(:input select {$:colour}  "Green":)
>  (:input submit post "Submit":)
>  (:foxend D4GoLiveForm:)

>  On target page , (MgmtOps.Test), I have just:

>  {$colour}

Graham, while testing adding and updating PTVs I found one issue in
the script, so now I updated fox.php with some bug fixes.
Please try the new version.

Your form should look something like this (I split the lines to make
it more readable):

(:fox D4GoLiveForm ptvtarget=MgmtOps.Test redirect=1:)
[+Current Status:+]
(:input select $:colour "":)
(:input select $:colour "Red":)
(:input select $:colour  "Yellow":)
(:input select $:colour  "Green":)
(:input submit post "Submit":)
(:foxend D4GoLiveForm:)

Main change: no curly brackets for the select element names.
The $:colour will make it into a ptv field name.
If you would use (:input select colour ...:) etc
you would need to specify also ptvfields=colour.
template=0 should not be necessary, as you use ptvtarget=

On the target page you need to set {$:colour} in order to display the
value of a PTV named "colour", i.e. for instance a PTV (:colour: Red:)

Fox will create (:colour: value:) as posted, if there is no PTV
present yet. Or a PTV in a different format if you specify in the form
ptvfmt= (text, or deflist etc.)

Hope this helps.


More information about the pmwiki-users mailing list