Expand my Community achievements bar.

include added rows to a click event

Avatar

Level 3

Hello all,

I'm having problem with my javascript for a click event to open a hyperlink.

The hyperlink is to open only if row1 is filled in and a verification checkbox is selected. The table is dynamic allowing the user to add more rows as needed.

My issue arises from the event not triggering for the added rows. Is there a code I can use in order to include the added rows in the click event?

Thank you!

3 Replies

Avatar

Level 7

Do you have any skill in programming JavaScript or other language? Excel formulas is not coding. To program Excel you need to use VBA.

Will your form be used by Reader?

Acrobat does not support dynamic forms. LiveCycle is much better at performing dynamic form tasks like adding rows to a table and adjusting for the added content.

Avatar

Level 3

I do have a background in JavaScript.

I created the form with Livecycle Designer. My code looks like this:

if(Subform4.Table1.Row2.CheckBox4.rawValue == 1 && Subform4.Table1.Row2.sharetenet1b.rawValue != null && Subform4.Table1.Row2.sharetenet1c.rawValue != null && Subform4.Table1.Row2.sharetenet1e.rawValue != null)

{

app.launchURL('https://cform.mwg.nj.gov/default.aspx', true);

}

if(Subform4.Table1.Row2.CheckBox4.rawValue == 0 && Subform4.Table1.Row2.sharetenet1b.rawValue != null && Subform4.Table1.Row2.sharetenet1c.rawValue != null && Subform4.Table1.Row2.sharetenet1e.rawValue != null)

{

xfa.host.messageBox("You must check the signature check box before submitting!", "Signature Fields", 0);

}

My problem is the code does not work for added rows in the table. I know how to carry formulas and calculations to added rows, but I do not know how to incorporate this code into added rows in the table. Any assistance is greatly appreciated.

Ricky

Avatar

Level 4

[Question moved to the LCD forum]