History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OQ-179
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dick Anderson
Reporter: Matthew Tomlinson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenQuote

Question validation ignores parent question/page section condition rules.

Created: 29/Oct/09 06:57 PM   Updated: 01/Nov/09 05:37 AM
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2

Release Notes Comment:
When a PageContainer (e.g. PageSection, QuestionSection, etc, etc) defines a condition to control whether it is or is not rendered, that condition is now taken to apply to the contents of the container too and prevents the contents from being validated. If the user cannot see the content, validation is not performed.


 Description  « Hide
Question validation ignores parent question/page section condition rules.

When a question is not displayed because its parent section condition attribute in the page flow evalutates to false, the question level validation is still enforecd.

For example, take a drop down with a ? set as default. If this questions partent (or grandparent) section (pageSection or questionSection) has a condition that evaluated to false, the drop down will not appear on the page, however the page will still check the question value when submitted, and with it defaulting to ? it will generate a required error. Meaning the page flow cannot progress - the field is required, but not visible to set.


ie
    <!-- Employers Liability circumstances -->
    <questionSection condition="m:test(section[id='Trade']/attribute[id='EL_Available']/value[.='Yes'])">
      <question title="Do you have a statutory exemption from Employers' Liability Insurance?" binding="/section[id='Trade']/attribute[id='ELStatutoryExemption']" styleClass="mainQuestion" renderHint="radio">
        <hintText>
          <![CDATA[The following employers are exempt: <br /> &#42; family businesses, however, this exemption does not apply to family businesses which are incorporated as limited companies; <br /> &#42; companies employing only their owner where that employee also owns 50&#37; or more of the issued share capital in the company. <br /> Other companies and organisations may also be specifically exempted, please refer to the HSE website <a href="http://www.hse.gov.uk/business/elci.htm">http://www.hse.gov.uk/business/elci.htm&lt;/a> for further information.]]>
        </hintText>
      </question>
      <question title="Do you have cover elsewhere for your Employers' Liability?" binding="/section[id='Trade']/attribute[id='ELCoveredElsewhere']" styleClass="mainQuestion" renderHint="radio"/>
    </questionSection>



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.