Reputation: 512
I'm successfully populating the Gravity form fields using "gform_pre_render " hook. now i need to remove few fields dynamically. I spend hours to looking into documentation and did google searches but no luck. Its really helpful if someone know how to unset fields in gravity form. Thanks in advance
Upvotes: 1
Views: 1756
Reputation: 512
Ok, i find solution to unset fields
inside gform_pre_render hook we can unset fields like this
if( $field->id == 7 ){
unset ( $form['fields'][7] );
}
Upvotes: 4