Type conversion is performed when setting field values. The type conversion is determined by the collectionField in the schema. When attempting to set a field value that is not defined in the schema, an exception is raised.
A string that identifies the field of interest. An exception raised if name not present in schema. A string, a number, or a date that specifies the value of the field. The value will be type-coerced to match the schema. The value of the field, or null if field is not present in schema.var d = this.dataObjects[0];d.setFieldValue("subject", "New laptop!", "RE: ");// Now get the same field value we just set. Here s = "RE: New laptop!"var s = d.getFieldValue({ name:"subject", includePrefix:true });// Get the same field value, with includePrefix set to false, the default// Now the value of s is "New laptop!".s = d.getFieldValue("subject");// Sets subject to "A. C. Robat" and clears prefixd.setFieldValue("subject", "A. C. Robat");
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.334.html