Actually I'm not sure if I'm having trouble with the Exit event or if there's something wrong with my script syntax...On the exit event of a field I'm checking to see if the field is empty or not and checking a flag I have set up.
The first If statement works - If I enter a value in the field everything goes according to plan. If I then delete the value in the field nothing happens.
//if field has a value hide subSection04
if (!(this.rawValue == null || this.rawValue.length == 0))
{
subSections.subSection04.presence = "hidden";
}
//if field is empty and flag equals true show subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == true))
{
subSections.subSection04.presence = "visible";
}
//if field is empty and flag equals false hide subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == false))
{
subSections.subSection04.presence = "hidden";
}
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Jono,
Your expression subFlags.Commercial.rawValue == true is comparing a String datatype with a boolean datatype.
Modify the expression as subFlags.Commercial.rawValue == "true"
I hope this should work for you.
You code should look like
//if field has a value hide subSection04
if (!(this.rawValue == null || this.rawValue.length == 0))
{
subSections.subSection04.presence = "hidden";
}
//if field is empty and flag equals true show subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "true"))
{
subSections.subSection04.presence = "visible";
}
//if field is empty and flag equals false hide subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "false"))
{
subSections.subSection04.presence = "hidden";
}
Nith
Thanks a lot Bruce... I am always learning from your sample PDF forms and code ....
Just wondering if you saw this issue here:
Using multiple fragments causes Adobe LC workbench/designer to crash
The problem is slowing down development work to a great extent.... I suspect it is because of using many nested fragments...
Tarek
Views
Replies
Total Likes
Hi Tarek,
I glad I've been able to help, but not sure I can help with your problem of crashes. I have had periods of forms crashing but has usually been one particular form, which we re-built. Have you tried Adobe Experience Manager - Forms ... the new Designer?
Bruce
Views
Replies
Total Likes
The new AEM Designer?! Are you referring to this one?
I will give it a try, but I am concerned it will cause issues to existing forms ... I need to set it up on a sandbox environment to test it before using in the actual environment.
So you think the new designer will solve the problem?
Tarek
Views
Replies
Total Likes
Hi Tarek,
I wouldn't too much, as AEM Forms looks just the same as LC Designer, but at least that means there doesn't seem to be any compatibility problems. I guess you have tried editing the form on other machines?
Bruce
Views
Replies
Total Likes
Thank you BR001 for you reply.
It is clearly a fault in the product, and I am wondering if this is acknowledged by Adobe.
Tarek
Views
Replies
Total Likes
Hi Tarek,
I don't have any contact with Adobe product teams, so don't know if it is a known problem.
There is the Feature Request/Bug Report Form , but LiveCycle is no longer an option.
I do have a form with 120 fragments, with about 10 of them nested, and never had any problems.
Bruce
Views
Replies
Total Likes
Hi Bruce,
Good to know that you are not facing the same problems I reported.
I am using this version of Adobe LiveCycle Designer, which version you are using? Did you follow the same steps I mentioned to reproduce the problem?
Tarek
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies