TOPIC:

Select-List wieder ausblenden 2 years 11 months ago #217597

  • Topic Author
  • Deinmedium
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 1
  • Thanks: 0
Hallo,

man kann ja eine Select-List über:
turn on element meinText if meineListe is beliebigerWert

auf der obersten Ebene einer Form einblenden. Das klappt auch ganz gut aber ich möchte jetzt das diese Select-List wieder verschwindet wenn genau ein bestimmter wert nicht mehr angewählt ist.

Ich hoffe das war verständlich?!

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

Select-List wieder ausblenden 2 years 11 months ago #217639

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

could we continue this topic in English, because we don't have any German speaking supporters at the moment?

This can be done by using visibility rules in JavaScript crosstec.org/en/support/online-documenta...s-in-javascript.html .
Replace visibility rules with one dummy rule:
turn on element mydummy if yourdummy is something, litteraly.
Then go to Advanced options of meineListe element and in the Actionscript section Type has to be set to Custom, Action to Change and there you write the following code:
function ff_meineListe_action(element, action)
{
    switch (action) {
        case 'change':
if( ff_getElementByName('meineListe').value== "beliebigerWert" ){
              return bfToggleFields('on','element','meinText',bfDeactivateField);
          }
else { return  bfToggleFields('off','element','meinText',bfDeactivateField); }
            break;
        default:;
    } // switch
} // ff_s_action


This will do the trick.

If you have more questions, feel free to ask.

Regards,

Mihaela

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

Select-List wieder ausblenden 1 week 6 days ago #250653

  • Henne222
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Hi,

is it possible to use this for more then one dependent select list.
For Example :

"meineListe" has 35 Values to show ore show not 35 dependent Lists ("meinText")

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

Select-List wieder ausblenden 1 week 6 days ago #250656

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

yes, if a value is selected you can "turn off" multiple fields
e.g:
function ff_meineListe_action(element, action)
{
    switch (action) {
        case 'change':
if( ff_getElementByName('meineListe').value== "beliebigerWert" ){
               bfToggleFields('on','element','meinText',bfDeactivateField);
              bfToggleFields('on', element, 'something', bfDeactivateField);
          }
else {  bfToggleFields('off','element','meinText',bfDeactivateField);
bfToggleFields('off', element, 'something', bfDeactivateField);
 }
            break;
        default:;
    } // switch
} // ff_s_action

Depending on which value is selected you can control which fields you want to turn on or turn off.

Regards,
Tihana

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

Select-List wieder ausblenden 1 week 5 days ago #250672

  • Henne222
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Hi,

thanks for the quick response, that means when i turn on 1 of my 35 select lists i have to turn of the 34 other items?

and then I have to do that for the 34 other choices?

the problem is if someone clicks 2 times in my selection list he gets 2 lists displayed if I don't hide them. So theoretically the user can click 35 times and has then 35 lists one below the other. I would like to have no matter which element is selected in the selection list, only this element can be displayed and all others remain hidden.

I hope it was understandable...

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

Select-List wieder ausblenden 1 week 5 days ago #250673

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

no, with this you can turn of/on one or more elements, if value from one select list is something.
E.g. if you have a select list defined like this:
0;Title1;value1
0;Title2;value2
and textfield with name something, and you want to turn off this textfield if selected value is value1.
function ff_nameofselectlist_action(element, action)
{
    switch (action) {
        case 'change':
if( ff_getElementByName('nameofselectlist').value== "value1" ){
               bfToggleFields('on','element','something',bfDeactivateField);
              
          }
else {  bfToggleFields('off','element','something',bfDeactivateField);

 }
            break;
        default:;
    } // switch
} // ff_nameofselectlist_action

Also, instead of this you can put visibility rules in your form->Advanced->Visibility rules:
crosstec.org/en/support/online-documenta...f-conditionally.html

Hope this helps

If you need more help, let me know

Regards,
Tihana

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

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