• 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: Reset Hidden Fields

Reset Hidden Fields 16 years 4 months ago #5832

I have managed to write the javascript to show/hide fields based on radio/dropdown selections. The only thing left I need help on is resetting those field to their \"original\" hidden state if the reset button is pushed. Right now it changes the selection back to their default checked item but they do not hide unless the page is refreshed. Does anyone know how to force a page refresh if the reset button is selected....or maybe you know a better way to reset the page. Any help is appreciated.
The administrator has disabled public write access.

Re:Reset Hidden Fields 16 years 4 months ago #5842

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

The solution has been provided in the ticket you've submitted, but I'm going to share it here too:
In order to achieve this you will need a freetext component that will have this code:
<button type=\"reset\" onclick=\"resetFields();\">Reset</button>
And place this script in the Form Layout tab:
<script type=\"text/javascript\">
function resetFields()
{
document.getElementById('field1').style.display = 'none';
document.getElementById('field2').style.display = 'none';
}
</script>

The reset button will reset all fields to their default values and the javascript function will hide the fields you want.
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.

Re:Reset Hidden Fields 16 years 2 months ago #6264

hi - thanks for posting - i have been searching for something similar where i can hide content based on used drop down etc
can you help -i would like to see your code and then customize it to my needs
thanks a lot
:lol:
The administrator has disabled public write access.

Re:Reset Hidden Fields 16 years 2 months ago #6265

hi - thanks for posting - i have been searching for something similar where i can hide content based on used drop down etc
can you help -i would like to see your code and then customize it to my needs
thanks a lot:lol:
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!