Disclaimer: This site is moderated by the Formidable Forms community. Formidable Forms and its parent company Strategy11 are not responsible for the words, opinions, and content posted by others on this site. This site is provided as a courtesy and free resource for the Formidable Forms Community. Any actions deemed as harassment, toxic or abusive, will result on being banned from this site and potentially losing your Formidable Forms license.
Thanks for your cooperation, if you have any questions please
consult our code of conduct
I use a snippet that goes something like this:
add_filter('frm_validate_entry', 'validate_my_form', 20, 2);
function validate_my_form($errors, $values){
$formId = $values['form_id'];
If ($formId == ) {
return array();
}
return $errors;
}
Thanks, Rob. Looks like this turns off required fields for everyone. Any hints on how to ensure this is only for a given user or role?
You can do anything in that function that you can do in PHP. If you want a certain user, you can use:
if (wp_get_current_user() == )
and if you want a certain role you can do something like this:
$user = wp_get_current_user();
$allowed_roles = array();
$allowed = !empty(array_intersect($allowed_roles, $user->roles));
OK. Thanks.