18 Posts
mikikado
9 years ago
3
Topic

Hi there!

I am now on trying almos 3 hours to change visibility of a "Free- Button". I have installed the Free-Butto plug in. Created 2 Buttons. I want that Button is not visible when the form is called but button 2. By clicking button 2 shall be button1 visible and button 2 not visible and vs. I have played with many variations with conditional states but couldn't reach my aim.

Here what I tried the last in condiitional states:

http://prntscr.com/6lzspt

In this case button1 = Angebot anfordern button2 = Leistungsbeschreibung

Sichtbar = is visible, verborgen = not visible

ist gedrückt = is clicked

I am not sure if I have "can't see the wood because of so much trees"-Syndrom!

Thank you for your answers in advance.....

regards Michael

Get a VIP membership
572 Posts
_jrmo
9 years ago
2
Level 1

Hi there,

If you have tried for so long, it might be time for a different approach. Try adding code to your main Joomla template to handle this instead.

Here's something from Stack Overflow to get you started. It uses jQuery and .hide() and you can also use .show()

http://stackoverflow.com/questions/12790297/hiding-button-using-jquery

Cheers

18 Posts
mikikado
9 years ago
1
Level 2

Thank you for your suggestion. But the point is not hide on change! My point is, that one of the buttons shall not be shown when loading the form/site.

When I click on one of the buttons is not visible.

572 Posts
_jrmo
9 years ago
0
Level 3

You asked for Button 1 to be hidden when the page is loaded, and then when you click Button 2, Button 1 becomes visible.

So:

jQuery('#button1').hide();

jQuery('#button2').click(function(){ 

   jQuery('#button1').show();

});

You must replace #button1 and #button2 with the actual selector / id of your buttons.

Get a Book for SEBLOD