Esempio di API getFieldValue()

var a =  formBridge.getFieldValue("xfa.form.form1.Subform1.TextField");
if(a.errors) {
    var err;
     while((err = a.getNextMessage()) != null)
               alert(a.message)
} else {
   alert(a.data[0])
}

getFieldProperties(som, property) Recupera l’elenco di valori per la proprietà specificata dei campi specificati nelle espressioni Som

  • Input:

    • som: Array contenente espressioni Som per i campi
    • proprietà: nome della proprietà il cui valore è obbligatorio
  • Output: Oggetto contenente il risultato come array nella proprietà data

  • Errore: Nessuno

setFieldProperties(som, property, values) Imposta il valore della proprietà specificata per tutti i campi specificati nelle espressioni Som

  • Input:

    • som: Array contenente alcune espressioni dei campi il cui valore deve essere impostato
    • proprietà: proprietà il cui valore deve essere impostato
    • valore: Array contenente i valori della proprietà specificata per i campi specificati nelle espressioni Som
  • Output: Nessuno

  • Errore: Nessuno

Utilizzo di esempio dell’API Bridge del modulo

// Example 1: FormBridge.restoreFormState
  function loadFormState() {
    var suc = function(obj) {
             //success
            }
    var err = function(obj) {
           while(var t = obj.getNextMessage()) {
         $("#errorDiv").append("<div>"+t.message+"</div>");
           }
           }
        var _formState = // load form state from storage
    formBridge.restoreFormState({success:suc,error:err,formState:_formState}); // not passing a context means that this will be formBridge itself. Validation errors will be checked.
  }

//--------------------------------------------------------------------------------------------------

//Example 2: FormBridge.submitForm
  function SubmitForm() {
    var suc = function(obj) {
             var data = obj.data;
         // submit the data to a url;
            }
    var err = function(obj) {
           while(var t = obj.getNextMessage()) {
         $("#errorDiv").append("<div>"+t.message+"</div>");
           }
           }
    formBridge.submitForm({success:suc,error:err}); // not passing a context means that this will be formBridge itself. Validation errors will be checked.
  }
Traduzione automatica
Utilizza il Selettore lingua per visualizzare la versione inglese della pagina.
Questa traduzione è stata utile?

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.