Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

No reset from instances if turn from "on" to "off" and "on" again

Avatar

Level 1

Hello,

i have build a dynamic pdf file with some "hidden" pages.

The pdf had one title page and the other pages are hidden and only visible if the user click to a checkbock at the title page.

now my Problem, if a user would set some pages to visible and fill out the textfield or so and hide this pageset again, all entrys are deletet (if visible again).

is it possible to Change this Setting from livecycle designer, or did a make something wrong.

my script:

(this.rawValue == "1"){ 

_autostore.setInstances(1)

else{ 

_autostore.setInstances(0)

} 

"AutoStore" is a partial form from 3 pages.

Thanks for Support or any idea.

2 Replies

Avatar

Level 10

The setInstances() method adds or removes elements to the form DOM and also the data DOM. So, once deleted the entered data is lost and a newly added instance will be populated with the default values.

To keep the data use another way to controll the visibility, like the presence property:

if ((this.rawValue == "1") { 

    autostore.presence = "visible";

} else{ 

    autostore.presence = "hidden";

}

Avatar

Level 1

Hi,

thnaks for Reply, this would work, if i set the complete page to "hidden" and with this script to vissible. :-)

greetings

Philipp