Search

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:

<input type="checkbox" name="conditions-acceptance" value="true" />

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

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details