cancel
Showing results for 
Search instead for 
Did you mean: 

Delete table lines using checkbox

Former Member
0 Kudos

Hi experts,

In an Adobe Form, we have created a table with control buttons to add and remove entries dynamically. We can add new lines succesfully using the "add" button.

In order to remove entries, one of the fields of the table is a checkbox, and we need to delete all entries checked when pressing "delete" button.

Could you provide us an example of javaScript code to delete table files?

Many thanks and regards

Paco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Daniel,

We had similar requirement, and instead of a check box we added a button with each row, when the user clicks on that button row was deleted.

Following is the code written on the click event of that button:

xfa.resolveNode("Table.item").instanceManager.removeInstance(this.parent.index);

Hope this will help you.

With Regards,

Amit

Former Member
0 Kudos

Hi Amit,

Thank you very much for your answer. I've used buttons instead of check boxes and it works! But now we have a new question: Is there any way to show an icon in a button?.

I would need to place a "Delete" icon in my buttons. Could anybody help me?

Thanks in advance.

Former Member
0 Kudos

Hi,

Instead of using the button in the column, use Image Field and in the Click event of the field write the code.

It should work. Let me know if there is any problem.

With Regards,

Amit

Former Member
0 Kudos

Hi Amit,

Many thanks! Now we have an image field with the correct icon, and we can script the Click event.

The problem is when we click on the image field, a "Select image file" popup appears. Is it possible to disable this popup.

Thanks in advance!

Former Member
0 Kudos

Hi Daniel,

I tried both the Image types: static and dynamic. In case of static images, all the events are disabled. And in case of dynmic image field Pop up is coming.

I guess, suppressing of PopUp is not possible, so we have to use buttons only for deleting the row.

With Regards,

Amit

Former Member
0 Kudos

Ok,

Finally I think we'll use normal buttons.

Many thanks for your help.

Answers (0)