cancel
Showing results for 
Search instead for 
Did you mean: 

Table fields Validation in online adobe form WDABAP

Former Member
0 Kudos

Hi,

I have a table in Online Adobe form, and one of the field in the table is Check Box, if the check box is selected the next field(with in the same table) should be left blank else it should issue some error like leave blank.

Can some one tell me how to to do this using javascript?

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

chintan_virani
Active Contributor
0 Kudos

Ravi,

For eg:- Lets assume you have a table name Table1 with 2 rows (Row1 and Row2) & 3 columns.

Row 1 has three cells --> Cell1 (which contains check box), Cell2(InputField which needs to be kep blank), Cell3( Assume its a numeric field)

Similarly Row 2 has three cells --> Cell1 (which contains check box), Cell2(InputField which needs to be kep blank), Cell3( Assume its a numeric field)

So the hierarchy will be

Table1
|--- Row1
    |-----CheckBox1
    |-----Cell2
    |-----Cell3
|--- Row2
    |-----CheckBox2
    |-----Cell2
    |-----Cell3

Now write following code in JavaScript in the change event of CheckBox1.

var currVal = Table1.Row1.CheckBox1.rawValue;
//xfa.host.messageBox("Current Val is : "+currVal);
if(currVal == 1) // Means checkbox is selected
{
 	xfa.host.messageBox("Please Leave Next Field blank");
  	Table1.Row1.Cell2.access = "readOnly";
}
else
{
	Table1.Row1.Cell2.access = "open";
}

Similarly, you need to write code for CheckBox2 of Row2.

Chintan

Answers (0)