• 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: Field is available when you select another field

Field is available when you select another field 12 years 9 months ago #18817

  • kulfi82
  • kulfi82's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I have a form with several fields (dropdown forms). I would like to field in the second level are available only when you select a field from the items above. See the picture below..

The administrator has disabled public write access.

Re: Field is available when you select another field 12 years 9 months ago #18827

  • thithi2
  • thithi2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
I already did it like that:

First: The field that holds the action that will trigger the others to be visible or not:

<div>{escolha:caption}:</div>
<div>{escolha:body}</div>
<div>{escolha:validation}</div>

Second: The fields that keep invisible just showing when some option is selected in the first field:
-- Note that you need to put a different ID for the divs you create.

<div id="qual" style="display:none;">{qual2:caption}:</div>
<div id="qual2" align="display:none;">{qual2:body}</div>

Third: The script that will make the second field to be visible or not by the choose of the first element:
Is this example when the user put in first element the option "Outro" the script will be triggered.

<script type="text/javascript">
function ChangeDropdowns(value){
if(value=="Outro"){
document.getElementById('qual').style.display="";
document.getElementById('qual2').style.display="";
} else {
document.getElementById('qual').style.display="none";
document.getElementById('qual2').style.display="none";
}
}
The administrator has disabled public write access.

Re: Field is available when you select another field 12 years 9 months ago #18841

  • kulfi82
  • kulfi82's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi Thithi2,
Thanks for the hint. However, it is too difficult for me. Can I ask you a simpler explanation of this method. I'm not an advanced programmer.

Thank you :)
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!