Aggiunta dell'istanza di un sottomodulo a un modulo

  1. Selezionare l'oggetto nella struttura del modulo a cui si desidera aggiungere lo script e selezionare un evento dall'elenco Mostra dell'Editor di script. Ad esempio, scegliere l’evento clic di un pulsante o altro modulo interattivo.

  2. Digitare uno degli script seguenti nell'Editor di Script, dove Subform1 è il nome del sottomodulo a cui aggiungere istanze, e il valore true indica che la nuova istanza di sottomodulo deve essere unita ai dati del modulo:

FormCalc

Subform1.instanceManager.addInstance(true) // Default instance manager syntax 
xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added subform in the form calculations.

o

_Subform1.addInstance(true) // Short form of the instance manager syntax 
xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added subform in the form calculations.

JavaScript

Subform1.instanceManager.addInstance(true); // Default instance manager syntax 
xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added subform in the form calculations.

o

_Subform1.addInstance(true); // Short form of the instance manager syntax 
xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added subform in the form calculations.

Rimozione dell'istanza di un sottomodulo da un modulo

  1. Selezionare l'oggetto nella struttura del modulo a cui si desidera aggiungere lo script e selezionare un evento dall'elenco Mostra dell'Editor di script.

  2. Immettere uno dei seguenti script nell'Editor di script, in cui Subform1 rappresenta il nome del sottomodulo da cui rimuovere un'istanza eintegerrappresenta il numero di indice basato su zero dell'istanza da rimuovere:

FormCalc

Subform1.instanceManager.removeInstance(integer) // Default instance manager syntax

o

_Subform1.removeInstance(integer) // Short form of the instance manager syntax

JavaScript

Subform1.instanceManager.removeInstance(integer); // Default instance manager syntax

o

_Subform1.removeInstance(integer); // Short form of the instance manager syntax