TOPIC:

Reset form values on turn off 3 years 6 months ago #203088

  • Topic Author
  • maxwbr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 22
  • Thanks: 0
How to reset the values of a form after a turn off?

I have 120 fields that need to be cleaned after turn off element. I tried if section op-pt is on set c1 !empty but it did not work. Works for few fields, but for many fields it did not work.

The names of my fields range from C1 to C112. And I will have more.

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

Reset form values on turn off 3 years 6 months ago #203107

  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thanks: 35
Hello,
Check out the example form that I made for you. It's in the attachment. Here is the script that does the trick:
function ff_radio_action(element, action)
{
    switch (action) {
        case 'change':
        opts = JQuery("[name=\"ff_nm_radio[]\"]");
        if(opts[0].checked){
              bfToggleFields('on','element','textfield',bfDeactivateField);
              ff_getElementByName('textfield').value = '';
        } else {
              bfToggleFields('off','element','textfield',bfDeactivateField);
            }
            break;
        default:;
    } // switch
} // ff_radio_action
The script is located in Radio > Advanced > ActionScript. You can extend the following script with whatever number of questions your form has. Let me know if you need further assistance.

Regards,
Marino
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
Attachments:

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

Last edit: Post by marino.brnardic.

Reset form values on turn off 3 years 6 months ago #203126

  • Topic Author
  • maxwbr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 22
  • Thanks: 0
Hi, Marino, thank you for your response.
I tried to use this script for a Select List but it did not work.
I'm sorry, but I'm a newbie.

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

Reset form values on turn off 3 years 6 months ago #203131

  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thanks: 35
Hello,
did you install the form that I've sent you? It's an example form which you can use for reference. If you need help with installing the package please refer to the following documentation:

https://crosstec.org/en/support/online-documentation/breezingforms/9-getting-started/94-packages.html

Regards,
Marino
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

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

Reset form values on turn off 3 years 6 months ago #203134

  • Topic Author
  • maxwbr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 22
  • Thanks: 0
I installed the package!
I'm having trouble modifying the script.
I do not know how to do this for this select list. :/

0;Select One;0
0;On;on
0;Off;off

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

Reset form values on turn off 3 years 6 months ago #203135

  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thanks: 35
I'll create an example with the select list and get back to you.

Regards,
Marino
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

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

Moderators: ForumSupport
Time to create page: 0.052 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!