I am trying to switch required fields to not required based upon a users logged in status. Just trying to get exisiting required to switch and not getting any change. The function and filter do work because the form does display. Note there is no logged in conditional in the function yet.
add_filter('gform_pre_render_1', 'form_logged');
function form_logged($form){
print $form['field'];
foreach($form['fields'] as $field){
if($field['isRequired']){
$field['isRequired'] = true;
return $form;
}
}
}