If condition of several fields is met then show image (on spawned page)
I have the following scenario:
First page ist standard
second page is being spawned out of an template
field1(text) is on the first page
field2 (text), field3 (numbers), field4 (numbers), field5 (image) are on the spawned page
if field1 is "a" &&
field2 is "b" &&
field3 is "1" &&
field4 is "2"
then field5 is visible
the normal state of field5 is set invisible
how can I manage this, and where does the code go?
does the code go to one of the text or the number fields or to the image field (there are about 40 image fields which visibility would be controlled over that script)
based on some code that Karl Heinz Kremer gave me to work with spawned pages I have managed to make it work just with two fields (script running as validation in field1)
// get this fields name
var fieldName = event.target.name;
// strip off the last part of the name
var groupName = fieldName.substring(0, fieldName.lastIndexOf(".")+1);
if (event.value == "a")
{
this.getField(groupName + "field5").display = display.visible;
}
