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

Key: OQ-176
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Matthew Tomlinson
Reporter: Matthew Tomlinson
Votes: 0
Watchers: 0
Operations

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

"Other" text answer for drop down lists

Created: 29/Oct/09 05:18 PM   Updated: 21/Jul/11 03:56 AM
Component/s: None
Affects Version/s: None
Fix Version/s: backlog

Release Notes Comment: Suggestion works


 Description  « Hide
Some drop down lists have an "Other" type value in the list (it may be represented by some other text value), this value is used to say that there is no other suitable option in the list. It would be useful to have a facility where if this value was selected, then a text box be made available for a further description to be entered.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Dick Anderson - 29/Oct/09 06:40 PM - edited
I think this can be done using a QuestionWithDetails with an "enableDetailsFor='Other'".

Dick Anderson - 30/Oct/09 05:13 PM
The following should do the job:

Define two attributes as follows: roofConstruction, and roofConstructionOther.


<quotation xsi:type="java:com.ail.openquote.Quotation">
    ...
    <asset id="asset" assetTypeId='Asset'>
        ...
        <attribute id="roofConstruction" value="?" format="choice,options=-1#?|1#Tile|2#Slate|3#Thatch|4#Other"/>
        <attribute id="roofConstructionOther" value="" format="string"/>
        ...
    </asset>
    ...
</quotation>


In the PageFlow you can then use a QuestionWithDetails to enable an "Other" text area:

<pageFlow id="QuotationPageFlow" xsi:type="java:com.ail.openquote.ui.PageFlow">
    ...
    <questionPage id="QuestionPage" title="About your home">
        <questionSection title="Some questions to help us:">
            ...
            <questionWithDetails title="What type of construction is used for the roof?"
                                 binding="/asset/attribute[id='roofConstruction']"
                                 detailsTitle="If 'Other' please give details:"
                                 detailsBinding="/asset/attribute[id='roofConstructionOther']"
                                 detailsEnabledFor="Other"/>
            ...
        </questionSection>
    </questionPage>
    ...
</pageFlow>