[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 12:54:59 CDT 2009

Wednesday, June 3, 2009, 3:41:01 PM, Randy Brown wrote:

> Thanks for the suggestion. Unfortunately, Fox doesn't do the
> replacement. I literally end up with:

> Modified {$*FullName} - {$$summary}

You are right, sorry! The 'csum' field gets processed by pmwiki,
which creates a $ChangeSummary global variable.
We could change fox.php to do this:
Add the following line in fox.php after line 743 (fox version 2009-05-15),
[after line reading: $IsPagePosted = 0;]

$ChangeSummary = $fx['csum'];

That will make Fox to use 'csum' from its array, thereby
any variable replacements on 'csum' are carried out by fox beforehand.

In the form you can then use something like:

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

I did got the  {*$FullName} wrong in my previous post!

I think I could make this change to fox.php for the distribution,
I don't see any harm in it, only the advantage that Fox can handle
the 'csum' field as any other field.


More information about the pmwiki-users mailing list