TOPIC:

turn off field text empty error 5 days 2 hours ago #276459

  • Topic Author
  • gateirow
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 7
  • Thanks: 0
Hi, frieds!

I have 2 radio button type fields with turn off and turn on, turn on enables the text field and turn off disables it, when turn on is enabled the text field is full, but if I decide to click on turn off without deleting what I wrote in the turn on text field, this data remains in the database, my question is how to make it so that when choosing turn off the turn on text field is automatically empty?

Thanks!

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

turn off field text empty error 2 days 9 hours ago #276464

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2942
  • Karma: 2
  • Thanks: 150
Hi,

oke, I understand where is the problem, I will create one example for you and provide it here,

Please give me a little time, because I'm mega busy

if you have more questions, feel free to ask!


Regards,
Mirko

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

turn off field text empty error 2 days 9 hours ago #276468

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2942
  • Karma: 2
  • Thanks: 150
Hi,

solved!

Please download->unzip->and install it (BF->Configuration->Package Installer->select this xml file->Install Package).

File Attachment:

File Name: mypck_0015...8-08.zip
File Size:7 KB


please test my example, and let me know, is working well!

you can find the code in the advanced of element 'radio group'

If you get to stuck, feel free to ask for help!
function ff_a_action(element, action)
{
    switch (action) {
        case 'change':
 vals = '';
          opts = JQuery("[name=\"ff_nm_a[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
          if (vals=="turn on") // here you can add further dependencies
          {
               return bfToggleFields('on','element','b',bfDeactivateField);
          }
          else
          {
ff_getElementByName('b').value=''; //this wiped values when is the element turned off
               return bfToggleFields('off','element','b',bfDeactivateField);
          }


            break;
        default:;
    } // switch
} // ff_a_action



Regards,
Mirko
Attachments:

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

  • Page:
  • 1
Time to create page: 0.073 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!