Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Created November 5, 2018 22:21
Show Gist options
  • Save zackkatz/8ec6fd324055e1e1d0ad03b0cee812c7 to your computer and use it in GitHub Desktop.
Save zackkatz/8ec6fd324055e1e1d0ad03b0cee812c7 to your computer and use it in GitHub Desktop.
GravityView - Remove required fields from Edit Entry
<?php
add_filter( 'gravityview/edit_entry/form_fields', 'gravityview_edit_entry_dont_require_fields' );
/**
* Remove the "required" setting from Gravity Forms fields in GravityView Edit Entry
*
* @return GF_Field[]
*/
function gravityview_edit_entry_dont_require_fields( $fields ) {
foreach( $fields as $key => $field ) {
$field->isRequired = false;
$fields[ $key ] = $field;
}
return $fields;
}
@DRlittlerock
Copy link

I'm not skilled enough to analyze the code above, but do you know if this has been updated? I have this added, but it's still requiring fields when I try to edit entries. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment