Hallo all,
I've made a form, witch is very advanced i think, and in this form I used the .mandatory option.
I've an dropdown box, and this dropdownbox controls if the other dropdownbox is required or not. I've turned on the binding and it's so that if you select option 2 the other dropdownbox isn't required, but if you select option 1 or 3 the dropdownbox must be required. Now the problem is that if you select option 2, then you can't change you selection.
Here's the code.
if
(this.rawValue = 2)
{
Cel6.mandatory
= "disabled";
}
else
{
Cel6.mandatory
= "error";
}
What is wrong with this code?
greetings,
Timo
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Timo,
When scripting an if statement, you need a double equals sign in the test:
if (this.rawValue == 2)
{
// ...
}
Also when dealing with dropdown I would place the script in the exit event, as the selection has been regiseterd at that stage and you can use .rawValue.
Should work then,
Niall
Views
Replies
Total Likes
Hi Timo,
When scripting an if statement, you need a double equals sign in the test:
if (this.rawValue == 2)
{
// ...
}
Also when dealing with dropdown I would place the script in the exit event, as the selection has been regiseterd at that stage and you can use .rawValue.
Should work then,
Niall
Views
Replies
Total Likes
Hi,
Try this one in the change event of the dropdown.
var a = xfa.event.change;
if (a == 2)
{
Cell6.mandatory = "disabled";
}
else
{
Cell6.mandatory = "error";
}
Thanks,
Bibhu.
Views
Replies
Total Likes
Hi Niall,
I did not see your reply while I was replying. Sorry
Bibhu.
Views
Replies
Total Likes
Hi Bibhu,
No problem! It happens all the time
Niall
Views
Replies
Total Likes
Hi Niall,
Thank you. This was the answer.
Greetings,
Timo
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies