Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created April 17, 2018 19:14
Show Gist options
  • Save Shelob9/601ac14060134b79de3ae4ecbf581767 to your computer and use it in GitHub Desktop.
Save Shelob9/601ac14060134b79de3ae4ecbf581767 to your computer and use it in GitHub Desktop.
<?php
/**
* Check if a Caldera Forms field contains PII
*/
//Get Form
//IMPORTANT: change form ID
$form_id = 'cf1234HiRoy';
$form = Caldera_Forms_Forms::get_form( $form_id );
//Check if field is personally identifying, by field ID
$is_personally_identifying = Caldera_Forms_Field_Util::is_personally_identifying( 'fld12345', $form );
//Check if field is personally identifying, by field slug
$is_personally_identifying = Caldera_Forms_Field_Util::is_personally_identifying( Caldera_Forms_Field_Util::get_field_by_slug( 'field_slug', $form ), $form );
<?php
/**
* Find fields in a Caldera Forms form that contains PII
*/
//Get Form
//IMPORTANT: change form ID
$form_id = 'cf1234HiRoy';
$form = Caldera_Forms_Forms::get_form( $form_id );
//Get array of fields with PII
$personally_identifying_fields = Caldera_Forms_Forms::personally_identifying_fields($form);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment