


I want to change the color of front automatically from black to red due to negative value in the numeric field in adobe livecycle designer. I think for this I need a java script.Have u any script like this?
Views
Replies
Sign in to like this content
Total Likes
Hi,
The following JavaScript in the exit event should work:
if (this.rawValue < 0) {
this.font.fill.color.value = "255,0,0";
this.caption.font.fill.color.value = "0,0,0";
}
else {
this.font.fill.color.value = "0,0,0";
}
Niall
Views
Replies
Sign in to like this content
Total Likes
but in the script show field what should be kept?
Views
Replies
Sign in to like this content
Total Likes
In the Show dropdown you would select "calculate" event. Then in the Script editor (5), you would try in your script:
Hope that helps,
Niall
Views
Replies
Sign in to like this content
Total Likes
but it works in the form which is made by only lyvecycle but it does not work with the form which is made by acrobat pro and finaly edited by life cycle. My form is made by acrobat pro and then it is edited by livecycle. In such case what can I do?
Views
Replies
Sign in to like this content
Total Likes
Hi,
Forms created in Acrobat (AcroForm) are completely different to forms created in LC Designer (XFA Forms). I would not be inclined to edit an AcroForm in LC Designer.
You should be able to add script in Acrobat to achieve what you are looking for. Something like:
var oField = this.getField("NumericField1");
if (oField < 0) {
oField.textColor = color.red;
}
else {
oField.textColor = color.black;
}
Please note that this JavaScript would be inserted into the field in Acrobat AND NOT in LC Designer.
I would recommend that you repost your question to the Acrobat Scripting forum: http://forums.adobe.com/community/acrobat/acrobat_scripting.
Good luck,
Niall
Views
Replies
Sign in to like this content
Total Likes
I have tried for the acrobat but it does not work. what can I do? I have insert the script in the text field properties> action> run a jav script. Is it correct? or i have to insert any other place?
Views
Replies
Sign in to like this content
Total Likes
in the script I think I have to change the field name NumaricField1.Am I right? do I have to change the oField.?
Views
Replies
Sign in to like this content
Total Likes
Hi,
I am missing the .value from the script above, eg
if (oField.value < 0) {
See an example here: http://assure.ly/u6X2Jt.
Please note that you can achieve similar results without script in the Format tab:
Niall
Views
Replies
Sign in to like this content
Total Likes