Willem van Duijn created TAP5-2604:
--------------------------------------

             Summary: FormFragment's renableInputFields does not consider 
nested FormFragments
                 Key: TAP5-2604
                 URL: https://issues.apache.org/jira/browse/TAP5-2604
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.4.4
            Reporter: Willem van Duijn


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to