Skip to Content Skip to Menu

show a hidden field

  • AlecsRU
  • AlecsRU
  • OFFLINE
  • Posts: 111
  • Thanks: 3
  • Karma: 0
4 years 2 months ago #320309 by AlecsRU
show a hidden field was created by AlecsRU
can I show a hidden field in the registration form if two text fields have different values? I specified in the parameters Conditional: hide, the condition "Value", "Equal" and two text fields. But the hidden field is not displayed. Will the field values be considered equal if they are empty? In the video example uses a button. Will Conditional work with text fields?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
4 years 2 months ago #320317 by krileon
Replied by krileon on topic show a hidden field
So you only want to show your other field if 2 other fields don't have the same value? It won't be able to check for that. The conditions are checking user input against a static value. Example as follows.

Field: name
Operator: Equal To
Value: Tom

In the above the field would display if the name field is equal to the value of Tom. The below lets you condition against a static substitution.

Field: name
Operator: Equal To
Value: [cb_othername]

This will work, but it will only work in display. It will not work in profile edit or registration because CB Conditional will have conditioned against the exist value of cb_othername. It can not live-update that condition during registration and profile edit.

There maybe a better way handle your condition. What are you trying to do exactly? What is the goal of this condition checking if 2 fields have same 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.

  • AlecsRU
  • AlecsRU
  • OFFLINE
  • Posts: 111
  • Thanks: 3
  • Karma: 0
4 years 2 months ago #320321 by AlecsRU
Replied by AlecsRU on topic show a hidden field
There is a last name field in the passport. The second field of the last name in the education document. If the last names are different, then you need to upload a document about changing the last name. But I would like to hide these file downloads for those who have the same last names and show them to those who have different last names.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
4 years 2 months ago #320322 by krileon
Replied by krileon on topic show a hidden field
Unfortunately there's no way to do that as CB Conditional doesn't support comparing a live edited field value against another live edited field value. It can only compare live field value against a static value. The usecase is so incredibly limited so it was never implemented as it'd be a lot of additional JS overhead. Best I can suggest is a checkbox field asking if they've a different last name and if they do display your second lastname field and a file field. Example as follows.

Field 1: Name
Field 2: Does the name on your passport differ from the name above?
Field 3: (if Field 2 = 1) Passport Name
Field 4: (if Field 2 = 1) Name Verification


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.

  • AlecsRU
  • AlecsRU
  • OFFLINE
  • Posts: 111
  • Thanks: 3
  • Karma: 0
4 years 2 months ago #320325 by AlecsRU
Replied by AlecsRU on topic show a hidden field
Thanks.

More question. How can I do auto actions when registering? The first auto actions. Register a new user if the data in the two fields is equal. The second case is that the data in the two fields is not equal, but a file must be loaded, which field is not required. In other cases, registration is not carried out. What kind of trigger and the type of auto actions can be used?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
4 years 2 months ago #320330 by krileon
Replied by krileon on topic show a hidden field
I don't recommend doing that. You're complicating a simple setup. Use the above recommended setup and make Field 3 and Field 4 required, which are conditionally made visible based off Field 2 so they can be marked required. Users shouldn't need to supply their last name twice unless it's actually different.


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