Answered
Can anyone provide script for the following please:
I would to have three different messages in hidden fields.
Based on the value that is calculated in a certain text box, one of the three messages would be shown.
For example, if the sum is less than 300, then message 1 would appear.
If the sum equals 300 to 499, then message 2 would appear.
If the sum is 500 or greater, then message 3 would appear.
Can anyone help? Thanks!
Acrobat forms JavaScript only for the field with the sum:
// hide all fields
this.getField("Message1").display = display.hidden;
this.getField("Message2").display = display.hidden;
this.getField("Message3").display = display.hidden;
if (event.value < 300) {
this.getField("Message1").display = display.visible;
}
if (event.value >= 300 & event.value < 500) {
this.getField("Message2").display = display.visible;
}
if (event.value >=500) {
this.getField("Message3").display = display.visible;
}LiveCycle Designer FormCalc:
Message1.presence = "invisible"
Message2.presence = "invisible"
Message3.presence = "invisible"
if ($.rawValue < 300) then
Message1.presence = "invisible"
endif
if ($.rawValue >= 300 and $.rawValue < 500) then
Message2.presence = "invisible"
endif
if ($.rawValue > 500) then
Message3.presence = "invisible"
endif
LiveCycle Designer JavaScript:
// hide all fields
Message1.presence = "invisible";
Message2.presence = "invisible";
Message3.presence = "invisible";
if ($.rawValue < 300) {
Message1.presence = "visible";
}
if ($.rawValue >= 300 & event.value < 500) {
Message2.presence = "visible";
}
if ($.rawValue >=500) {
Message3.presence = "visible";
}
George Kaiser