Last active
September 5, 2016 04:24
-
-
Save spivurno/d4516b2d137847b9d597 to your computer and use it in GitHub Desktop.
Gravity Wiz // GP Unique ID // Share a global unique ID across all forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@spivurno Does this work? I'm trying to figure out a global unique ID across multiple forms.