Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zackkatz/061694191c891cbb362ee8bb09ff43f0 to your computer and use it in GitHub Desktop.
Save zackkatz/061694191c891cbb362ee8bb09ff43f0 to your computer and use it in GitHub Desktop.
GravityView - Don't turn hidden fields into text fields in Edit Entry
<?php
add_action( 'gravityview_edit_entry', 'gravityview_dont_show_hidden_fields', 20 );
/**
* Don't turn hidden fields into text fields in GravityView Edit Entry
*/
function gravityview_dont_show_hidden_fields() {
if( ! class_exists('GravityView_Fields' ) ) {
return;
}
$Field = GravityView_Fields::get('hidden');
if ( $Field ) {
remove_filter( 'gravityview/edit_entry/form_fields', array( $Field, 'edit_entry_fix_hidden_fields' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment