Return value of entered data in registration form

  • OTWD
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 weeks 16 hours ago #169990 by OTWD
Hi i have a dropdown menu with 5 choices that need to be visible on every registration (this is mapped from Community Builder).
Principal, Teacher, Parent, SNA, Other
For certain events if a user has chosen e.g SNA then they are not allowed to register as its only for Teachers.
I was thinking of creating a custom field that would only show on specific events where only Teachers can register.
If I could return the value "Teacher"  from the drop down into my custom field  then I can do a validation to prevent a user from booking.
How can i do this please?

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
4 weeks 9 hours ago #169992 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Return value of entered data in registration form
Sorry, the question is not very clear to me. Could you please explain more details about it?

Tuan

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 weeks 8 hours ago #169994 by OTWD
Sure
Field 1 = Dropdown
Values = Principal, Teacher, Parent, SNA, Other
Visible on all events

Field 2 = Text or Hidden?
Value = return (value from Field 1)
e.g if dropdown value from field 1 = "Teacher" then this value would be "Teacher"
Visible only on specific events

Server side validation
teacheronly (checks if Field 2 has value of "Teacher")
if Field 2 Value !== "Teacher" { return false }
else {
return true }

I cant put the validation on Field 1 because sometimes I want to allow any type of user to register.

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
3 weeks 6 days ago #170000 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Return value of entered data in registration form
Hi

That's not possible. We do not have an option to have value of field 2 generated base on the selected value of field 1.

Honestly, I do not understand why you need to have field 2 here. Wouldn't you be able to get the value of field 1 directly ?

Tuan

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 weeks 6 days ago #170001 by OTWD
No problem.
The reason I cannot do it on field 1 is because field 1 is needed on all events.
For some events, I am trying to prevent certain types of user from booking them. For example, sometimes I don’t want a parent to book an event that is for teachers.
Other times I want to allow parents and teachers to book an event. So you can see why I cannot do validation on field 1

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc