[pmwiki-users] Fox target from radio or select inputs?

Hans Bracker design at softflow.co.uk
Mon Feb 20 17:16:26 CST 2012


Hello Vince,

Monday, February 20, 2012, 10:00:11 PM, you wrote:

> While trying to get Fox to create a page using a form with target=
> I discovered in the documentation that the name could be constructed
> from a text input field. It appears that it cannot be constructed
> from an input select or input radio.  Is this correct.  I would like
> the new page name to consist of two parts, the second part being the
> date (which is easy to do, and works fine) and the first part being
> a word chosen from a small list, such as a select list, or radio
> buttons. I do not want the users to muck up the name.  
> Is my reading of the documentation correct? If so, is there a workaround?

you can use (:input select ... :) directives to construct your drop
down select control.
Example:
(:foxmessages:)
(:fox frm target="{$$abc}-{(ftime fmt=%y%m%d%H%M%S)}" :)
(:foxtemplate "test":)
(:input select abc A:)
(:input select abc B:)
(:input select abc C:)
(:input select abc D:)
(:input select abc E:)
(:input submit post :)
(:foxend frm:)

The selected value becomes part of the target name.
Note that the ftime expression gets evaluated when the page loads,
not when the form is submitted. I am having trouble achieving the
latter. I think there is a bug in fox.php, which prevents multiple
replacement variables from being evaluated on input. Works fine with
just one. Also using quotes in the fmt part of the ftime expression
leads to trouble. in the example i left them out, making sure there
are no spaces.


Best regards,
 Hans
www.softflow.co.uk




More information about the pmwiki-users mailing list