Can't hide Empty and Required field

2 years 6 months ago #326628 by krileon
Replied by krileon on topic Can't hide Empty and Required field
Ok, was able to put together a similar situation. There isn't a way to hide an empty select field like that. The best I can suggest is under Global add the following option.

Value: none
Label: None


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.
The following user(s) said Thank You: galanopd

Please Log in to join the conversation.

2 years 6 months ago #326629 by galanopd
Replied by galanopd on topic Can't hide Empty and Required field
Congrats Kyle, that worked!

Thanks

Please Log in to join the conversation.

2 years 6 months ago #326630 by krileon
Replied by krileon on topic Can't hide Empty and Required field
I'm working on a cleaner solution for this. First I'm improving CB Query Field and all of its Query Select field types to turn off required validation and to hide the fields row if there are no options available at all (either from the query or specified under Global; field must be totally empty for this behavior). Next I'm adding an option to CB Core Fields Ajax to not display empty Update On results (default is to always display them).

The end result will be the State field will only be visible if it has something to select and it will only validate if there is something to select.


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 to join the conversation.

2 years 6 months ago #326632 by krileon
Replied by krileon on topic Can't hide Empty and Required field
Ok, the above behavior is now implemented in latest CB Query Field and CB Code Field build releases for their select fieldtypes. A CB Core Fields Ajax build release is also available adding the new "Display Empty Update On" parameter and when set to Disable will suppress the display of the empty fields if the Update On response is empty.

All you should need to do once you've updated both CB Query Field and CB Core Fields Ajax is remove any hardcoded options under the Global tab then under CB Core Fields Ajax integration parameters set "Display Empty Update On" to Disable. This should give you the desired behavior of suppressing State entirely if there's nothing to select (e.g. country has no states). It will automatically handle toggling Required state and skipping validation as well if there's nothing to select.


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.
The following user(s) said Thank You: galanopd

Please Log in to join the conversation.

2 years 6 months ago - 2 years 6 months ago #326674 by galanopd
Replied by galanopd on topic Can't hide Empty and Required field
In simple words, PERFECT!

Bravo once again!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

2 years 1 month ago - 2 years 1 month ago #328640 by galanopd
Replied by galanopd on topic Can't hide Empty and Required field
Unless I do something wrong, just noticed that although it works and the field is disabled, its title remains visible when using conditions.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.272 seconds

Facebook Twitter LinkedIn