Possible Bug with On Request

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible Bug with On Request

Justin Will
From my testing it appears that the _form collection is not available in the On Request method in the Active4D.a4l file.  I have tried to get values from the form variables using several methods but none seem to work from the On Request Method.

Including:
_form{xxx}
get request value
get form variables(array;array)

It does appear that the query params are available in the on request method just not the form values.

Thanks
Justin Will

_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Possible Bug with On Request

Aparajita Fishman
> From my testing it appears that the _form collection is not available in the On Request method in the Active4D.a4l file.

That's because it isn't meant to be available. The docs say:

"The handler is passed the path portion of the URL. The _query collection (or _form collection if “parameter mode” is set to “form variables” in Active4D.ini) is populated with the contents of the request’s query (if any), and is set to read-write mode so that you can directly modify the query."

If you want to change the URL based on a form variable, you'll need to do a redirect within a regular Active4D script.

Regards,

  Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Possible Bug with On Request

Justin Will
In reply to this post by Justin Will
I moved my code to the On Execute Start and was able to get my desired result.  I guess I was thinking that is what On Request did with the ability to modify the URL.

Thanks
Justin
_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/
Reply | Threaded
Open this post in threaded view
|

Re: Possible Bug with On Request

Aparajita Fishman
> I moved my code to the On Execute Start and was able to get my desired result.  I guess I was thinking that is what On Request did with the ability to modify the URL.

On Request *does* allow you to modify the URL, but it doesn't give you access to the form variables.

Regards,

  Aparajita


_______________________________________________
Active4D-dev mailing list
[hidden email]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/