[pmwiki-users] FOX Question.

Hans design5 at softflow.co.uk
Thu Oct 18 03:40:43 CDT 2007


Thursday, October 18, 2007, 3:17:24 AM, Stirling Westrup wrote:

> When a filter issues a message and aborts, how do you ensure that the fields
> that were input aren't blank when the user is returned to the form? I haven't
> been able to get that to work.

First, you need to provide for preserving input values in post fields.
Add to config.php:

# POST input values will be preserved
foreach ($_POST as $k=>$v) {
     $InputValues[$k] = htmlspecialchars($v);
}


Second, make sure your input fields do not set default values.
(:input text email:) will work, whereas
(:input text email "":) will not preserve any value entered, but
displays an empty form field (value is "").


With this in mind preserving input values when aborting
should work fine if the Fox filter uses the function

   FoxAbort($pagename, "abort-message text");



  ~Hans




More information about the pmwiki-users mailing list