Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2604

FormFragment's renableInputFields does not consider nested FormFragments

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.4.4
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:

      Description

      I have nested FormFragments, all 'hidden' on initial page load.

      When the outer FormFragment is made visible in the browser (using a TriggerFragment mixin) the form-fragment.js Javascript code (renableInputFields function) targets all contained input fields and unsets the 'disabled' property, hence they will be sent to the server upon submit.

      However, it also does so for the hidden (t:formdata) input-field of nested FormFragments, which triggers validation of FormFragments that are hidden in the browser, resulting in error messages for invisible validate=required-fields. It should only do this for input elements not under control of a nested FormFragment. 

      The same applies to disableInputFields, although that one now works because if the outer FormFragment becomes hidden all nested ones should be made hidden too.

      Either this behaviour should be fixed, or nested FormFragments should not be allowed.

      In addition, the FormFragment only cares about 'input' fields; textarea's should also be considered.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              willemvduijn Willem van Duijn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: