Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Resetting table does not remove inserted image in dynamic form

Avatar

Level 1

I am currently creating a form that allows my users to insert an image and write a description by using a table. 

I have a button that resets the table by using:

 

Photos._Row1.removeInstance(0);

And that works to remove any additional rows (Row2 +) I have inserted and all of the description text.  However, on Row1, it does not remove the image, only the text.

Is there additional script to remove the image from Row1 to bring it back to a clean table?

0 Replies

Avatar

Level 10

Hi,

xfa.host.resetData();

will reset all of the user entered data, including images.

Hope that helps,

Niall

Avatar

Level 1

Thank you so much, Niall.   I had seen that in other scripts.  This time I just popped it in on the end and voila! 

Buuuuut then I ran into a snag.  What do I need to do to reference that snippet of code so it only resets the table and not the entire form?  Or is that a much bigger broader bit of coding?  If so, I'll go back to the Java coding I was playing with before and try to tweak.

Still... thank you!