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
版权声明:本文标题:php - Run htmlentities() on all submitted values through gravity forms 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749175255a2327681.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论