admin管理员组

文章数量:1130349

I need a way to run through all submitted values throghh the htmlentities() filter in gravity forms. I am using the gform_pre_submission filter. I am successfuly able to find the type of field since we donot want to do this for URLS or file inputs. But I do not know how to actually grab the fields within the form object. Here's the code I am using.

add_action( 'gform_pre_submission', 'pre_submission_handler' );
public function pre_submission_handler( $form ) 
{
    foreach ( $form['fields'] as $field ) {
        if ($field->type !== 'fileupload') {
            /* Run the field through htmlentitites filter */
        }
    }
}

I need a way to run through all submitted values throghh the htmlentities() filter in gravity forms. I am using the gform_pre_submission filter. I am successfuly able to find the type of field since we donot want to do this for URLS or file inputs. But I do not know how to actually grab the fields within the form object. Here's the code I am using.

add_action( 'gform_pre_submission', 'pre_submission_handler' );
public function pre_submission_handler( $form ) 
{
    foreach ( $form['fields'] as $field ) {
        if ($field->type !== 'fileupload') {
            /* Run the field through htmlentitites filter */
        }
    }
}

本文标签: phpRun htmlentities() on all submitted values through gravity forms