[pmwiki-users] How to prepend text to the value entered in a form's text box

Hans design5 at softflow.co.uk
Wed Jun 3 03:16:55 CDT 2009


Tuesday, June 2, 2009, 5:47:59 AM, Randy Brown wrote:

> How do I prepend text to the Summary when the user submits a form?
> I already know how to set a default value, and how to get a
> user-entered value, but not how to mix the two.

> For example, If the user enters "I changed X" I want to prepend
> "Modified {*$FullName} - " and have the summary end up as "Modified MyPage - I changed X"

Perhaps you could use two fields for this in the Fox form:

(:input hidden csum "Modified {$*FullName} - {$$summary}":)
(:input text summary:)

Fox should do the var replacement on form submission,
and 'csum' carries the summary.
But I have not tested this.


  ~Hans




More information about the pmwiki-users mailing list