spivurno
10/8/2015 - 2:25 AM

Gravity Wiz // GP Unique ID // Share a global unique ID across all forms

Gravity Wiz // GP Unique ID // Share a global unique ID across all forms

<?php
/**
 * Gravity Wiz // GP Unique ID // Share a global unique ID across all forms
 */
add_filter( 'gpui_unique_id_attributes', 'gwiz_global_unique_id', 10, 3 );
function gwiz_global_unique_id( $atts, $form_id, $field_id ) {

	if( $atts['type'] != 'sequential' ) {
		$atts['form_id'] = 1;
		$atts['field_id'] = 1;
	}

	return $atts;
}