Good Day All
Thansk to a number of folks I now have a working form..... I guess you can teach ann old dog a new trick (sometimes) ;>)
Good Day All;
Anyway.... The last part (to make it look nice), there are 3 sections of the form that should only be visual and mandatory if the user selects something other that a “u” from a drop down.
So in other words if a user selects
If the user selects “n or u ” from a dropdown at the top of the form , “scope_subform” is to become visible and the field also becomes manatory.
Below is what I tried and it did not work. I am getting this error for the java consol.
“syntax error
23:XFA:form1[0]:#subform[0]:status_subform[0]:Table3[0]:Row1[0]:d_d_scope_1[0]:exit”
Under the dropdown “binding” the “item values” are
Value Text
1 I
2 u
3 n
( this.rawValue == 1 )
{
scope_subform.presence = "hidden"
}
else
{
Scope_subform.presence = "visible"
= "";
}
Thanks all
Solved! Go to Solution.
Views
Replies
Total Likes
The other thing you can do is in the script editor you can hit the Syntax checker button (book with a checkmark on it) and it will point out the offending line as well.
Paul
Views
Replies
Total Likes
Why do you have the = ""; as the 2nd last line ....that does not make sense. Remove it and try again.
Paul
Views
Replies
Total Likes
Thanks Paul. Not sure what that little end piece was doing in there….
Anyway, removed the little piece and this is ther error I got with the Java consol
syntax error
20:XFA:form1[0]:#subform[0]:status_subform[0]:Table3[0]:Row1[0]:d_d_scope_1[0]:exit
This is the full code I was using for this field. What is interesting is, I lose the color selected for the drop down when I changed the value.
switch (this.rawValue)
{
case "1":
this.font.fill.color.value = "0,255,0";
break;
case "2":
this.font.fill.color.value = "255,215,0";
break;
case "3":
this.font.fill.color.value = "255,0,0";
break;
}
( this.rawValue == 1 )
{
scope_subform.presence = "hidden"
}
else
{
Scope_subform.presence = "visible"
}</script>
Chomp
Views
Replies
Total Likes
The 20 at the beginning of the error message indicates the line where the error is. In this case you have not put the "if" in the expression before the (this.rawValue == 1). This is causing a syntax error where the } ends.
Paul
Views
Replies
Total Likes
The other thing you can do is in the script editor you can hit the Syntax checker button (book with a checkmark on it) and it will point out the offending line as well.
Paul
Views
Replies
Total Likes
Thanks Paul... With your help I got it working. Works like a charm
Thanks Again for all your help
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies