Retrieving a $_POST value inside an event filter
This is an open discussion with 2 replies, filed under Extensions.
Search
Depending on your PHP configuration, it may be available in $_REQUEST
. There may be a more official way of accessing it though.
Another option would be to put the check directly in your event, instead of in a filter. You can definitely still access the $_POST
array there.
Actually, your function should be receiving $context as it's first parameter. You should be able to access submitted data via $context['fields']
. Try var_dump($context)
inside your function and have a poke around.
Create an account or sign in to comment.
I am attempting to create a conditions check filter. Simply put this event filter will check to see if the user has agreed to the terms and conditions provide by a form.
I have an event filter already setup instructing a user to insert an input field like so:
The problem is im unable to retrieve the $POST value because Symphony strips the $POST array (for security reasons most likely). How can I determine if the user has selected this input from an event filter?
Im using the /fontend/ EventPreSaveFilter delegate.
Thanks. passbe