Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created Apr 17, 2018
Embed
What would you like to do?
<?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