I am new to LiveCycle Designer and am having some difficulty getting it to do what I want it to. I have a form that was created in Adobe Professional that I am trying to convert to LiveCycle Designer. There are three options on this form for Billing Terms, based on delivery terms. When an option is selected, I want the other two options to disappear. These are drop down boxes - Billing terms for orders being installed, billing terms for orders just being shipped, and billing terms for orders for service and no product. I was able to get this to work in Adobe Professional using Java Script. I tried coping the Java Script over to LiveCycle Designer, and now it won't work. I've tried everything I can think of, and nothing seems to work. Does anyone know how I can accomplish this?
Solved! Go to Solution.
Views
Replies
Total Likes
You have placed the code in the exit event.
You need to change the event.newText to thisrawValue..
The following code worked in the Exit event.
FOBBillingTerms.presence = (this.rawValue != "" && this.rawValue != null) ? "hidden" : "visible";
Try and let me know if you still have issues.
Thanks
Srini
Views
Replies
Total Likes
1st you woudl have to save the file out of Designer as a dynamic PDF.
2nd the script woudl be different when using Designer than in Acrobat. Can you paste the code in here so we can see what you did?
Paul
Views
Replies
Total Likes
The Script syntax in Acroforms and XFA forms is different..May be it will be easier if you can post what script are you trying to execute.. That can help to identify the changes in the script to work with XFA forms..
For example in XFA to get the value of a field, you need to to use,
FieldName.rawValue
Thanks
Srini
Views
Replies
Total Likes
Here is the script that I used in Adobe Professional.
if
(event.willCommit) { getField(FOBBillingTerms).display = (event.value === " ") ? display.visible : display.hidden;
}
Views
Replies
Total Likes
You can change the script the following way to work with LC..
FOBBillingTerms.presence = (event.value != "" && event.value != null) ? "hidden" : "visible";
But you need to pass the correct value in "event.value" to make it work..
If you want to compare a field's value then you may need to change it to FieldName.rawValue
If it is dropdown, then you can change it to event.newText.
Hope this helps..
Thanks
Srini
Views
Replies
Total Likes
I changed the script to read:
FOBBillingTerms.presence
= (event.newText != "" && event.newText != null) ? "hidden" : "visible";
However, the FOBBillingTerms field does not disappear when I enter Installation Billing Terms. I put this script on the Change event of the InstallBillingTerms field, and nothing happened when I selected an option from the drop down field. I moved it to the Exit event of the InstallBillingTerms field and still nothing happened. What am I doing wrong? I also said that it was JavaScript, not FormCalc. Is that correct?
Thank you very much for your assistance.
Views
Replies
Total Likes
Will it be possible to send the form across.. If so send it to LiveCycle9@gmail.com..
So I can have a look at it..
Thanks
Srini
Views
Replies
Total Likes
You have placed the code in the exit event.
You need to change the event.newText to thisrawValue..
The following code worked in the Exit event.
FOBBillingTerms.presence = (this.rawValue != "" && this.rawValue != null) ? "hidden" : "visible";
Try and let me know if you still have issues.
Thanks
Srini
Views
Replies
Total Likes
That does it. It works perfectly. Thank you very much for your assistance.
Thank you,
Diane Royer
Product Support Analyst
(330) 490-3956
Views
Replies
Total Likes