Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gravity Wiz // Gravity Forms // Dynamically Populating User Role
* Dynamically Populating User Role
add_filter('gform_field_value_user_role', 'gform_populate_user_role');
function gform_populate_user_role($value){
$user = wp_get_current_user();
$role = $user->roles;
return reset($role);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.