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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

reset button

Avatar

Not applicable
trying to use the rest button to only reset a image field or reset only one page of the form. can this be done???



Thank!!
0 Replies

Avatar

Level 10
The reset is programmed to do the whole form. You would have to build your own reset by getting a list of objects on the page and resetting each field object individually.

Avatar

Level 2
Hi Paul, Mark,



May i know how i can hide an image to a reset button?

i've tried the following to the existing script on the rest button but it doesn't work:



xfa.host.resetData();



image1.presence = "hidden";



the reset data button doesn't work anymore.



Can you help? Thanks!

Avatar

Level 10
I am not sure that I follow. Buttons do not have images associated with them. You can have objects overlaying each other so it looks like there is an image on your button but they are still 2 distinct objects.



If you have Acrobat hit Ctrl-J to bring up the java console and see if there are any errors reported.



Lastly, make sure your form is dynamic.

Avatar

Level 2
Hi Paul, sorry, maybe i wasn't clear enough....

I have a reset button on my form, this will clear all form data when clicked.



I have an image which, when the user hit on reset button, it still remains visible. So i need a script on the click event of the reset button hide it or to make it invisible.



Not that there was an image on the reset button.

Avatar

Level 10
To make the image invisible use imageFieldName.presence = "invisible"

Avatar

Level 2
Hi Paul, I've used the above script onto the reset butoon, but it doesn't work and to no avail.... may i know, if there is a Yes/No radio button, what value does it return? is it "0" or "Off"?



can i script:



if (radiobutton.rawvalue = "0" && radiobutton.rawvalue = "Off")

{

Image.presence = "hidden";

}



i tried plotting the scripts onto different objects to see if it works.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now