Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Field being required conditional on another field

  • pipermac
  • pipermac
  • OFFLINE
  • Posts: 70
  • Thanks: 1
  • Karma: 0
9 years 11 months ago #257049 by pipermac
I have a field that I want to be a required field depending on the value of a previous field.

How can I do this?

Eg. you have 2 fields If field 1 has a value of X then field 2 has to be entered but if field 1 is not X then field 2 is not required.

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
9 years 11 months ago - 9 years 11 months ago #257075 by krileon
You can't condition the required state of a field. This feature was pulled from CB Conditional, because it's just not reliable and messes up validation too much. What you can do is have 2 versions of the field. 1 is marked required and the other isn't. Then display either/or based off the value of your field. Required state conditioning may come back in a much later release, but for now it's not planned.


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.
Last edit: 9 years 11 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum