diff --git a/app/GravityForms/GravityForms.php b/app/GravityForms/GravityForms.php index 6db1a1e6..53973d1f 100644 --- a/app/GravityForms/GravityForms.php +++ b/app/GravityForms/GravityForms.php @@ -11,6 +11,7 @@ class GravityForms public function register(): void { + add_filter('gform_field_content', [$this, 'disableReadSpeakerHiddenField'], 10, 5); add_action('pre_get_posts', [$this, 'handleLegacyForms']); add_filter('gform_form_theme_slug', [$this, 'setFormThemeSlug'], 10, 2); add_filter('gform_incomplete_submissions_expiration_days', fn () => self::INCOMPLETE_SUBMISSIONS_EXPIRATION_DAYS); @@ -22,6 +23,19 @@ public function register(): void // Remove the encryption filter for merge tags so the data can be used in emails. remove_filter('gform_merge_tag_filter', 'gf_encryption_gform_merge_tag_filter', 10, 4); + + } + + /** + * Disable ReadSpeaker for hidden fields + */ + public function disableReadSpeakerHiddenField(string $content, GF_Field $field, $value, int $lead_id, int $form_id): string + { + if ('hidden' === $field->type) { + $content = str_replace(' true, + 'digid_provider' => 'owc-signicat-openid', + 'eherkenning_is_active' => true, + 'eherkenning_provider' => 'owc-signicat-openid', + 'eidas_is_active' => true, + 'eidas_provider' => 'owc-signicat-openid', +]; diff --git a/htdocs/wp-content/themes/sluis/functions.php b/htdocs/wp-content/themes/sluis/functions.php new file mode 100644 index 00000000..41a0fafc --- /dev/null +++ b/htdocs/wp-content/themes/sluis/functions.php @@ -0,0 +1,7 @@ +