Hi,
I am currently using Adobe Lifecycle Designer ES. I have a form that has two radio buttons (each dependent on the other). One of the radio buttons, if checked, has a date field that I would like to make required to be completed if this particular radio button is choosen. I would assume this could be done by an "if" statement, but I'm not very good at code and was wondering if someone can assist? Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I have an example here: http://assure.ly/hxHupW.
You can change the mandatory property using script.
To make a field mandatory you set the property to "error". Whereas to make a field optional you set the property to "disabled".
If we take that the radiobutton value that you want to use to set the datefield to mandatory is "1", then the following JavaScript in the click event of the radiobutton exclusion group:
if (this.rawValue == 1)
{
datefield.mandatory = "error";
}
else
{
datefield.mandatory = "disabled";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
I have an example here: http://assure.ly/hxHupW.
You can change the mandatory property using script.
To make a field mandatory you set the property to "error". Whereas to make a field optional you set the property to "disabled".
If we take that the radiobutton value that you want to use to set the datefield to mandatory is "1", then the following JavaScript in the click event of the radiobutton exclusion group:
if (this.rawValue == 1)
{
datefield.mandatory = "error";
}
else
{
datefield.mandatory = "disabled";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Hi Niall,
Thanks so much for the code. Worked perfectly!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies