• 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: Triggering the Conditional Fields to refresh?

Triggering the Conditional Fields to refresh? 4 years 1 month ago #41072

  • mpr
  • mpr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
So I have a Javascript running on a form that updates a pulldown field (call it field 2) based on the response to an earlier pulldown field (call it field1). That all works fine.

The issue is, once my script has run, and both pulldown lists are selecting the right items, the conditional fields (based on field2) that should show elements isn't getting triggered.

So when I manually changed field2, the conditional fields do their thing. But when field2 is changed based on the javascript from field1, conditional fields do nothing.

Is there a command I can run at the end of my script to trigger a refresh or update of the conditional field system?

 
function foobar(selectBox) {
	var op = selectBox.options[selectBox.selectedIndex];
	var optgroup = op.parentNode;
 
	document.getElementById("PetitionType").value = optgroup.label;
 
	//alert("selected option text is:  " + op.text + " \noptGroup label is:  " + optgroup.label);//
}
 
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!