• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Show Caption/Textbox Upon Slection

Show Caption/Textbox Upon Slection 13 years 9 months ago #13984

  • phil1
  • phil1's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Help!!!

I have a Dropdown with the following Additional Attribute:
(ignore stripped code)
onclick="if (this.value == 'BBC Good Food Magazine') document.getElementById('BBCGoodFood').style.display = ''; else document.getElementById('BBCGoodFood').style.display = 'none';
 
if (this.value == 'Delicious Magazine') document.getElementById('Delicious').style.display = ''; else document.getElementById('Delicious').style.display = 'none';
 
if (this.value == 'Olive Magazine') document.getElementById('Olive').style.display = ''; else document.getElementById('Olive').style.display = 'none';"
This is working fine, but upon visiting the page it still shows the textbox captions prior to selecting via the dropdown.

I have placed the following in the Additional Attribute in each of the texboxes that I want to appear upon selection from the dropdown.
style="display: none;"
Any advice would be appreciated.
Thanks
The administrator has disabled public write access.

Re:Show Caption/Textbox Upon Slection 13 years 9 months ago #14038

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 745
  • Thank you received: 66
Hello,

In order to hide the captions as well you could try adding an unique id to the <tr> tag that contains the fields you want to show/hide and use those id's in the if statements. This way both the caption and the fields will be hidden when the conditions are met. You can see an example on this topic on our demo server:

demo.rsjoomla.com/fex

This examples also shows how to hide the fields automatically when the page is loaded.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!