TOPIC:

Field hide/visible 3 years 7 months ago #225424

  • Topic Author
  • ducman
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 59
  • Thanks: 0
Good morning, I'm sorry to bother again, I've searched for information about the question I have but I do not get anything, I'll explain ...

I have a drop-down called "Field1" with several fields, for example option1, option2, option3. I have a text field called "Field2" that is hidden, I would like it when it is selected from "Field1" the option2 that was hidden is visible, I do not know if this is possible.

Discuss that I work only with Contentbuilder.

Thank you very much for everything!!

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

Field hide/visible 3 years 7 months ago #225448

  • Topic Author
  • ducman
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 59
  • Thanks: 0
Hi, I've reviewed this link ( crosstec.org/en/forums/37-contentbuilder...ditional-fields.html ) but I do not get an answer ...

Any ideas? You could also disable the field and enable it when the correct option is selected.

Thanks ;-)

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

Field hide/visible 3 years 7 months ago #225487

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

It is possible. To achieve what you want please do as follows:
1) Make text field "Field2" a regular text field instead of hidden.
2) Go to the wanted view. Go to View tab and in the Editable column click on [select] of the wanted element.Then go to Scripts tab and in the Init (JS) section in the Init Code textarea write the following code:
if( jQuery("#cb_33").val() !='option2') {
jQuery("#cb_34").parent().parent().parent().hide(); }

var el = jQuery("#cb_33").on('change', function(){
if( jQuery("#cb_33").val()=='option2') {
jQuery("#cb_34").parent().parent().parent().show(); }
else {
jQuery("#cb_34").parent().parent().parent().hide();
}
});
NOTE: In the code above replace cb_33 with the ID of "Field1" field, and cb_34 with the ID of "Field2" field. You have to inspect the form to get the IDs.

That will do the trick. Let me know if this works how you wanted.
If you have more questions, feel free to ask.

Regards,

Mihaela

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

Field hide/visible 3 years 7 months ago #225493

  • Topic Author
  • ducman
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 59
  • Thanks: 0
Thank you very much, it works great !!!

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

Field hide/visible 3 years 7 months ago #225528

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Great!

I'm glad that it works for you!

Regards,

Mihaela

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.086 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!