I need to add multiple roles using gravity form ID 13 from subsite ID 11

I have been trying to create a user with multiple roles for when they sign up to gravity form ID 13 from subsite ID 30. I have tried creating 3 user feeds but only the first user feed is getting picked up by the website.

I also tried adding in a php code which is not working and it is:

function add_additional_role( $user_id, $feed, $entry, $user_pass ) {

if ( 11 !== get_current_blog_id() )


// Role name ID to add

$role_to_add =array("ra_bronze_member","affiliate","bronze_member":wink:;

// Get current user object

$user_obj = new WP_User( $user_id );

// Add the role above to existing role(s) for the user

$user_obj->add_role( $role_to_add );


I have added the website ID because I am using multisite and I there are different user role to be added in different sites.

The second one I need to do is to add additional roles to who is already signed up in the website ID 30 using the same form ID 13. So what I did with the form is a hidden field "Already Logged In?" and using a conditional field of hiding the need for a username and a password. I would like to add the roles biz_bronze_member, affiliate and bronze_member. Is there a different code for this one?