Scripting

  1. Are there any limitations in JavaScript implementation for HTML Forms?

    Answer:

    • There is limited support for xfa.connectionSet script. For connectionSet, only server-side invocation of web service is supported. For detailed information, see Scripting Support.
    • There is no support for $record and $data in client side scripts. However, if the scripts are written in a formReady, layoutReady block, the scripts still work because these events run on the server side.
    • XFA Draw element-specific scripts such as changing the Draw text (or Caption text if there are fields) are not supported.
  2. Are there any limitations in using formCalc?

    Answer: Only a subset of the formCalc scripts is currently implemented. For detailed information, see Scripting Support.

  3. Is there any recommended naming convention and are there any reserved keywords to avoid?

    Answer:

    • In AEM Forms Designer, it is recommended not to begin the name of an object (such as a subform or a text field) with an underscore (). To use underscore at the beginning of the name, add a prefix after the underscore,<prefix><objectname>.
    • All HTML5 forms APIs are reserved keywords. For custom APIs/functions, use a name that is not identical to HTML5 forms APIs.
  4. Do HTML5 forms support floating fields?

    Answer: Yes, HTML5 Forms support floating fields. To enable floating fields, add the following property to the rendering profile:

    NOTE
    By default, the fields are not enabled for floating. You can use Forms Designer to set the floating property of the fields…
    1. Open CRXde lite and navigate to the /content/xfaforms/profiles/default node.

    2. Add a property mfDataDependentFloatingFieldof type String and set the value of the property to true.

    3. Click Save All. Now the floating fields are enabled for the HTML Forms using the updated rendering profile.

      NOTE
      To enable floating fields for a specific form without updating the rendering profile, pass the mfDataDependentFloatingField=true property as a URL parameter.
  5. Does HTML5 forms execute the initialization script and form ready event multiple times?

    Answer: Yes, the initialization scripts and form ready events are executed multiple times, at least once on the server and once on the client side. It is suggested to write scripts like initialize or form:ready events based on some business logic (form or field data) so that the action is performed based on the state of data and idempotent (if data is same).

Designing XDP

  1. Are there any reserved keywords in HTML5 forms?

    Answer: All HTML5 forms APIs are reserved keywords. For custom APIs/functions, use a name that is not identical to HTML5 forms APIs. Apart from reserved keywords, if you use object names that begin with an underscore (_), it is recommended to add a unique prefix after the underscore. Adding a prefix helps avoid any possible conflict with HTML5 forms internal APIs. For example, _fpField1

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more