Skip to Content Skip to Menu

Conditional Field

  • Stanby
  • Stanby
  • OFFLINE
  • Posts: 21
  • Thanks: 3
  • Karma: 1
2 years 8 months ago - 2 years 8 months ago #328470 by Stanby
Conditional Field was created by Stanby
The questionnaire starts with a dropdown selection and for most selections, the question set doesn't change, however, for a few selections there will be a change of field.

Is there a way to do this in conditional?
Last edit: 2 years 8 months ago by Stanby.

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328474 by krileon
Replied by krileon on topic Conditional Field
I've no idea what you're asking. You want the options available in a dropdown to change based off some sort of conditions? or you want to show/hide questions based off your selection?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • Stanby
  • Stanby
  • OFFLINE
  • Posts: 21
  • Thanks: 3
  • Karma: 1
2 years 8 months ago - 2 years 8 months ago #328483 by Stanby
Replied by Stanby on topic Conditional Field
Sorry, I wasn't very clear. Okay, for example,

I have a dropdown with 10 choices,
7 of those choices nothing changes

If any of the other 3 are selected
one field is hidden and a different field is shown

The field I'm adding is there a way to set the condition based on those 3 possible selections?

i.e. If any equal to = choice7, choice8, choice9, hide field 3 and show field 4
Last edit: 2 years 8 months ago by Stanby.

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

  • Stanby
  • Stanby
  • OFFLINE
  • Posts: 21
  • Thanks: 3
  • Karma: 1
2 years 8 months ago #328486 by Stanby
Replied by Stanby on topic Conditional Field
Ignore me, I can affect the changes needed using PHP.

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328493 by krileon
Replied by krileon on topic Conditional Field

The field I'm adding is there a way to set the condition based on those 3 possible selections?

Yes, that's what the Contains and In operators are for. So if you want to check if a single select field has a value in a list of values you'd use the below.

Operator: Is In
Delimiter: ,
Value: one,two,three,four

Value would just be your comma list of values you want to match. Contains works by splitting the fields value while In works by splitting the condition value.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum