Conditional select options are set and assign checkbox selection to user profile
-
Hi Everyone
I’m looking for help with the following logic, if anyone can help it would be greatly appreciated. It is required in the registration and is based on a users selection of a school
If a user selects a school from the dropdown list ie. School 1, then by selecting that school
it sets pre-defined groups and assigns the school and the pre-defined groups to the users profile.My way of thinking (maybe way off)
//Input type = select
School 1
School 2
School 3//Input type = checkbox
Group 1
Group 2
Group 3
Group 4//Condition: if user selects an option from dropdown field
if(select id == option value(“School 1”)
{
// set these groups checkbox fields as selected
set group pre-defined-groups(“Group 1”, “Group2”, “Group 4”)// assign selected school option to user’s profile
??? (select field is only used to allow those groups pre-defined to be used by a new user registering to the site).// assign pre-defined-group checkbox field to user’s profile
??? (because these groups are set up through buddy press does that mean they should automatically be added)}
if(select id == option value(“School 3”)
{
// set these groups checkbox fields as selected
set group pre-defined-groups(“Group3”, “Group 4”)// assign selected school option to user’s profile
???// assign pre-defined-group checkbox field to user’s profile
???
}admins should be able to change school or groups anytime
Thanks
- You must be logged in to reply to this topic.