Forked from spivurno/gp-unique-id-global-unique-id.php
Created
September 5, 2016 04:24
-
-
Save phillipwilhelm/c1189981dc6654a7510c4cf2b393a5c0 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 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