[pmwiki-users] Workaround for fox form redirection problem

Randy randy at brownragfilms.com
Sat Apr 12 21:10:14 CDT 2008


Hans,

The latest version of Fox isn't working for me.

1) First I installed the latest version of Fox, but not Foxedit. My  
invalid input redirection problem was unabated:

(a) When the edit form is called, the URL shows "...n=MyPage? 
action=foxedit&...".

(b) But when the form encounters invalid input, it displays an error  
message and gives the user a chance to correct the error. However, the  
URL now shows "...n=MyForm" and nothing else after it. Pressing cancel  
leaves the user on the form. Pressing enter causes the form to be the  
target of the update.

2) Then I tried installing the latest version of Foxedit as well, to  
see if that would fix the problem. That caused my form to simply  
return me to the target page when invalid input is submitted. No error  
message or chance to correct.

3) I then tried using Foxedit to edit an anchored section (using code  
that had previously worked). My old code didn't work now.

4) So I modified the code to make the form explicit:

{[foxedit #to_do_current 'Edit current' form=Edit.EditMessageForm]}

The above still brings up the EditSectionForm - not the form that I  
specified.

Randy


On Apr 12, 2008, at 2:12 PM, Hans wrote:

> Saturday, April 12, 2008, 7:00:38 PM, Randy wrote:
>
>> Does anyone have any suggestions as to how to redirect the user back
>> to the calling page when a fox form encounters invalid input? The  
>> only
>> thing I can think of is to use cookies, which I'm trying to avoid.
>
>> On the calling page:
>> {[foxedit label="MyTarget" form=MyForm]}
>
>> On my form page I have:
>> (:fox myform template=MyTemplate target=MyTarget redir={*$FullName}:)
>
>> If the user provides invalid input on the form, the redirection after
>> pressing submit or cancel fails. The user ends up staying on the form
>> page.
>
> I am failing to see the problem. Perhaps all you need to do is to
> change the form to
>
> (:fox myform template=MyTemplate target={$EditTarget} redirect=1 :)
>
> {$EditTarget} is provided by FoxEdit. Any abort from submission
> resulting from an invalid input determined by foxcheck will
> take you back to the calling page automatically, and not leave you on
> the form page. This improvements have been added to FoxEdit with the
> last update 2008-03-29.
>
>  ~Hans
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080412/1977c556/attachment-0001.html 


More information about the pmwiki-users mailing list