Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillipwilhelm/c1189981dc6654a7510c4cf2b393a5c0 to your computer and use it in GitHub Desktop.
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
<?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