TOPIC:

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272397

  • RonnyM's Avatar Topic Author
  • RonnyM
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 70
  • Thanks: 0
Hi :)

How can I display a section when the value in a field is less than 1999?

I tried the following display rule, but unfortunately it doesn't work:
turn on section "name of section" if "name of element" is ![<1999]

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

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272398

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11643
  • Karma: 3
  • Thanks: 756
Hi,

for this you can use javascript and visibility rules in this element (in which you want to check if value < 1999)->Advanced->Actionscript->check Custom:
crosstec.org/en/support/online-documenta...s-in-javascript.html

For this you need to put in form->Visibility rules:
turn on element mydummy if yourdummy is something
DON'T CHANGE ANYTHING LEAVE IT AS IT

If you get in stuck let me know, and I will help

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272399

  • RonnyM's Avatar Topic Author
  • RonnyM
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 70
  • Thanks: 0
The examples at the address:

crosstec.org/en/support/online-documenta...s-in-javascript.html

unfortunately only refer to radio and checkbox groups. But I use an element text field.

Is there a suitable function for this?

Did I understand the display rule correctly (see attachment)? :blink:
Attachments:

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

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272400

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11643
  • Karma: 3
  • Thanks: 756
Hi,

please go to this textfield->Advanced->Actionscript->check Custom->check Change and put:
function ff_nameoftextfield_action(element, action)
{
    switch (action) {
        case 'change':
var test=ff_getElementByName('nameoftextfield').value;
if( test < 1999 )
{
               bfToggleFields('on','section','namoofsection',bfDeactivateField); //nameofsection is name of section               
              
   }
else
 {  
bfToggleFields('off','section','nameofsection',bfDeactivateField);


 }
            break;
        default:;
    } // switch
} // ff_nameoftextfield_action
-nameoftextfield is name of textfield (not title)
-nameofsection is name of section (not title)

Please don't forget to add in form->Advanced->Visibility rules:
 turn on element mydummy if yourdummy is something
Leave it as it, don't on way you add it, exactly just copy this and don't change anything

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272401

  • RonnyM's Avatar Topic Author
  • RonnyM
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 70
  • Thanks: 0
Works perfectly! Thanks very much!! :)

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

turn on section "name of section" if "name of element" is less than 1999 7 months 2 weeks ago #272403

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11643
  • Karma: 3
  • Thanks: 756
Hi,

super :D

I am glad I was able to help, if you need anything else, feel free to ask

Regards,
Tihana

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

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