TOPIC:

conditional fields showing in mailback issue 1 week 6 days ago #273627

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Hello Mirec,

Why can't something like the following work?:

jQuery(function($){
$('#ff_elem4557').change(function(){
if($(this).val() === 'Credit_Card'){
$('#chkAccountInformation, #venmo, #cashapp, #paypal, #bankAccount').remove();
}
else if($(this).val() === 'Bank_Check'){
$('#ccInformation, #venmo, #cashapp, #paypal, #bankAccount').remove();
}
else if($(this).val() === 'Venmo'){
$('#ccInformation, #chkAccountInformation, #cashapp, #paypal, #bankAccount').remove();
}
else if($(this).val() === 'CashApp'){
$('#ccInformation, #chkAccountInformation, #venmo, #paypal, #bankAccount').remove();
}
else if($(this).val() === 'PayPal'){
$('#ccInformation, #chkAccountInformation, #venmo, #cashapp, #bankAccount').remove();
}
else if($(this).val() === 'Bank_Account'){
$('#ccInformation, #chkAccountInformation, #venmo, #cashapp, #paypal').remove();
}
});
});

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

conditional fields showing in mailback issue 1 week 6 days ago #273630

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,

did you test it?

my solution works?

regards,
Mirko

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

conditional fields showing in mailback issue 1 week 6 days ago #273637

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Hello Mirko,

Okay, this is what I did:

I selected Credit Card, filled out a few of the fields, then switched payment method to Bank Check and filled out a few of its fields, I then switched back to Credit Card just to see if the fields I had filled in initially were empty, and yes they were empty, but I went ahead and filled in a few fields, just to see if when I switched back to the Bank Check if those fields would now be empty, but they are not...they still have the data I entered.

So my question is, your solution works if the user changes payment method one time, but not beyond that?

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

conditional fields showing in mailback issue 1 week 6 days ago #273643

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,


I teste now and on works!

you said:

I went ahead and filled in a few fields, just to see if when I switched back to the Bank Check if those fields would now be empty, but they are not...they still have the data I entered.


do you talk here about 'Bank Check ' to isn't empty?


In the test, the elements connected with 'Credit Card' only should be empty, another no, because I didn't finish the code for other elements!

Let me know!

Only this element should be empty, see the image below:




regards,
Mirko
Attachments:

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

Last edit: Post by Mirec.
Moderators: ForumSupport
Time to create page: 0.072 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!