Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CB Conditionals: What is the (best) way to make a field editable, only if it is not filled yet?

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
11 years 1 month ago #233974 by NicoFaaij
Hi,

I think it have to be simple but...

I only want to make a text-field editable on profile edit if it is empty.

Doing a conditional check on that field itself doesn't work, because it will be removed as soon as the user types in the first letter. So the user will not be able to type in more than just 1 letter.

So I thought using a Query-field would work as that is really looking in the database and the value will stay empty until the submit button is clicked. However it seems to me that CB Conditionals doesn't work with/on Query fields?

What is the (best) way to make a field editable, only if it is not filled yet?

Kind regards,
Nico

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233983 by krileon
You can't, the jQuery acts instantly and will see it now has a value. When it sees this it'll hide the field as it's configured to do. It does not wait for blur (lost focus of input) as it acts immediately. Your best bet is to set it as Read Only, Required, and place it on your registration page.


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.

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
11 years 1 month ago #234099 by NicoFaaij
Hi Kyle,

Okay, I thought something like this should be simple, but it isn't :cheer: Maybe it is possible for a new CB version to remove the "CB Conditional: Field condition preferences" section on query-fields as I think that is suggesting that you can use that also on query fields.

The field is not required and at registration not always known. Beside that an auto action can clear the field value later on.

I finally found out a solution. I copy the field with an auto action to a readonly field and use a condition on the value of that field.

Another suggestion for a next release is to use or at least also display the databasse cb_* field name on the auto action field lookup. I want to have same titels on different fields and now it is difficult to select the right one.

Kind regards,
Nico

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #234101 by krileon

Okay, I thought something like this should be simple, but it isn't :cheer: Maybe it is possible for a new CB version to remove the "CB Conditional: Field condition preferences" section on query-fields as I think that is suggesting that you can use that also on query fields.

It can work with query fields. It just can't work with then using jQuery, because there is no html input to run the jQuery against.

Another suggestion for a next release is to use or at least also display the databasse cb_* field name on the auto action field lookup. I want to have same titels on different fields and now it is difficult to select the right one.

Added feature ticket to implement for next CB Auto Actions release.


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