Description: A form component with extended features. Supports:

  • Tabindex generation: In the right order. Can/Should be accessed in your own HTML components, through JSP Expression Language.
  • Error validation client and server with interactive visual error listing (Client-side validation is still IN DEVELOPMENT!!!).
  • Integrates with DIF's client event logic (with the @OnSubmit in stages)
  • Layout: Free, Pool and Tabular
  • Form submission URL creator: Just say the stage ID.
  • Default submission/reset buttons
  • etc.

JavaDoc: Click here

Remarks: Only these forms can be integrated with the @OnSubmit, since a specific information must be submitted to instruct the server of what form has been submitted. You should not try to mimic this behavior, since it may change in the future without further notice.

All submit actions should be rendered with the formActions component. This will ensure a proper visual rendering of the components.
When we do not specify any submit buttons through the formActions in a form, one will be automatically generated for us, with a submit and reset button.

Body content: JSP context.


Name Description Data type Required Default value
name The name (identifier) of the form String No Generated one in the form "formX" where X is the sequential number of forms on the current page
title The label for the form. Will create a field set for this String No -
cssClass An optional CSS class to apply to the panel body. String No -
layout Inner Fields layout. See bellow. String No Pool layout
border Creates a default fieldset element Boolean No True if a title has been defined, False otherwise
noActions Omit's the default action buttons generation Boolean No False
autoComplete Enable autocomplete of the inner inputs (for safety purposes sometimes it should be disabled). Boolean No True
readonly Activate readonly mode for all inner fields. Will also omit the submit buttons rendering Boolean No False
method The form's submission method String No post (post is mandatory if multipart forms are used
destinationStageID The target destination after submit String No The current stage id
cancelStageID The target destination stage for the optional cancel action String No -
submitAction If a submit option is available Boolean No true
saveAction If a save option is available Boolean No false
labelWidth A custom width for all enclosed labels Integer No As defined by the CSS in use
helpCategory The help category for all inner help items String No The title or name of the form
renderFootnotes Defines if footnotes are rendered on the element. Boolean No True
confirmation Displays a default message to confirm the form submit Boolean No False, unless confirmationMessage is set
confirmationMessage Custom message for the confirmation message String No -
noRequiredIndicator Disable required(*) simbol and required footnote Boolean No False
validationFunction If codetrue/code publish a javascript function that validates all form fields, according to the validationMode parameter Boolean No Depends*
validationMode Determines the type of client side validation this form will have FormClientSideValidations No BOTH

(*) The validationFunction default value is dependent of the configuration in PresentationConfigurations.formClientSideValidationDefault. The default is False.


        <dif:form name="login">
        <dif:fieldset title="${messages.pageHeading}">
            <input name="afterloginstageid" type="hidden" value="${stage.afterLoginStageID}" />
            <dif:textField id="_user" />
            <dif:textField id="_pass" confidential="true" />
        <input type="submit" name="${messages.submit}" />

Validation modes: Available validation modes:

  • BOTH: Validates both the parameters via local javaScript code, and calls @OnSubmitValidationLogic through an AJAX call, * merging the results on the form
  • PARAMETER_ENGINE: Validates only the parameter definitions, constraints and rules, via local javaScript code.
  • VALIDATION_HANDLER: Calls only the @OnSubmitValidationLogic through an AJAX call,

See also:

Back to tag reference