Skip to Content Skip to Menu

[SOLVED] CB Conditional delete values in fields

6 years 8 months ago - 6 years 8 months ago #301475 by soportemarketing
[SOLVED] CB Conditional delete values in fields was created by soportemarketing
I'm using a button radio field to show/hide diferent fields. It works, but when I hide the fields all their values go to empty. For example, I've an cb_country field (query dropdown field from a select in db) with a default value "Spain". At first it loads properly, with "Spain" inside. When I click "No" in the button, cb_country fields hides ok, and when I click "Yes" in the button, It shows again, but doesn't keep the default value. With other more simple fields (text field) I've the same problem.

How can I fix this, for keeping values when hide/show fields with conditional?

Thanks in advanced
Last edit: 6 years 8 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

6 years 8 months ago #301476 by soportemarketing
Replied by soportemarketing on topic CB Conditional delete values in fields
Solved. I've realised that, in "plugins", the CB Conditional has an option to enable/disable reset or not to blank if condition is met.

After that, and with little changes in AND to OR conditional in updating to 5.0.0 all works.

Thanks indeed.
The following user(s) said Thank You: krileon

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

6 years 7 months ago #302457 by zahmundzornig
Replied by zahmundzornig on topic CB Conditional delete values in fields
Is the option "Reset" in the conditional field plugin a new feature? I searched now for hours why some fields are deleted after saving a profile. Now I see, that the Reset-Button for "Reset field to blank if condition is not meet" is enabled. I never made this setting and the profile savings worked for month perfect. I have this problem since the last CB plugin update.
I think it would be good to set the default setting for this field on "disable".

www.zahmundzornig.de thanx joomlapolis for the great work and support!
Build with CB: www.jaii.de

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 7 months ago #302479 by krileon
Replied by krileon on topic CB Conditional delete values in fields
No, it's not new. That parameter has existed since CB Conditional implemented value resetting something like a year ago. No, default of disabled does not make sense. A user doesn't have access to the field so it's supposed to be reset. If you disable resetting and you've 3 fields conditioned 1 after another the chain won't work anymore for example.


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.

6 years 7 months ago #302510 by zahmundzornig
Replied by zahmundzornig on topic CB Conditional delete values in fields
Thank you for quick response!

Ok, it´s "relatively" new. ;)
I was not aware of this new feature. So I have to check the conditionals in detail. Now it makes a difference how I set conditionals:

Show field X if group A meets condition Y
or
Hide field X if group B not meets condition Y

The result of publishing/unpublishing the field is the same, but in one case the field will be reset and in one not.

www.zahmundzornig.de thanx joomlapolis for the great work and support!
Build with CB: www.jaii.de

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 7 months ago #302523 by krileon
Replied by krileon on topic CB Conditional delete values in fields
If a condition is not met then the value is reset. If you don't want value resetting just disable it. It only negatively impacts condition chaining and if you're not chaining multiple conditions you don't have to use value resetting.


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