Reset form values on turn off

  • maxwbr
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0

maxwbr created the topic: Reset form values on turn off

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.
#203088
  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thank you received: 35

marino.brnardic replied the topic: Reset form values on turn off

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!
#203107
Attachments:
  • maxwbr
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0

maxwbr replied the topic: Reset form values on turn off

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.
#203126
  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thank you received: 35

marino.brnardic replied the topic: Reset form values on turn off

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!
#203131
  • maxwbr
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0

maxwbr replied the topic: Reset form values on turn off

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
#203134
  • marino.brnardic
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 405
  • Karma: 9
  • Thank you received: 35

marino.brnardic replied the topic: Reset form values on turn off

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!
#203135
Moderators: ForumSupporttomeperica
Time to create page: 0.059 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here