Thank you for your field. It still works fine. But it doesn’t work with conditional logic. Could I fix that with a code snippet?
Maybe the tools are here, but I don’t write php so I don’t know how to apply these to your code. https://github.com/AdvancedCustomFields/acf-field-type-template/issues/35
Thank you,
violet
]]>Is this plugin still being supported?
is it possible for somebody to select a user role, and then send an email to ALL users within the specified role?
The email form should be simple, following this: https://github.com/cpham/acf-contact-form
However, how can i select roles and list the users/email to all users in one role?
]]>It would be possible to extend for select2 js? We can have 30 roles.. Thx
]]>Does this work? I just installed this plugin.
I dont see any option for selectinng Role selector type when creating new field hm?
So I’ve been able to bring up the selected roles, but I can’t figure out how to bring up users with those selected roles? Specifically the users’ email addresses? Here is what I have so far.. I am also testing this outside the loop.
<?php
//** get field
$roles = the_field('user_notification');
?>
<?php
//get users with the selected role
foreach ( $roles as $user ) {
$roles = array_merge( get_users($user->$roles));
echo($user->user_email);
}//end for each
?>
DO I have the wrong syntax or am I way off here? Any help is appreciated.. I’m can’t seem to find much documentation on this.
Thanks!
]]>Hello guys!
I know this is a very simple question, but I’m not able to know how to create an array of user roles selected.
I’m using the User Role field for been chosen in a page.
With this values I’ll allow current user to see the page content.
Here is my code:
// Store the ACF "Role" info
$roles = get_field('iuser_role');
if($roles) {
// Create an array of users that will be able to access the page from the ACF "User" field
$roles_that_can_access_this_post = array();
foreach($roles as $role) {
$roles_IDs_that_can_access_this_post[] = $role;
}
Thanks!!
]]>Hi Daniel,
thanks for your plugin.
When i select Return Format= Role Object, i get the following error on the “Edit Post” page in WordPress Admin:
Warning: Invalid argument supplied for foreach() in /Sites/[…]/wp-content/plugins/acf-role-selector-field/acf-role_selector-v4.php on line 230
Greets
]]>Hi Daniel,
Is there a way for us to filter selectable user roles or even based on user capabilities?
Best,
Bin
Hi Daniel,
Thanks for the ACF add-on. However, If I use the mult-select/checkbox and uncheck all choices, then save, I’m using on an option page by the way, one choice is still marked. Is there a way, if I uncheck all, then it will stay unchecked and become null ?
Thanks!
]]>After creating a custom field as a User Role Selector and attaching it to a Custom Post Type, I get the following error before all of the User Roles:
Warning: in_array() expects parameter 2 to be array, boolean given in wp-content\plugins\acf-role-selector-field\role_selector-v4.php on line 165
]]>I followed installation but it doen’t work
]]>