RE: Select with open selection

Rafael,
 
I don't think the 1.0 Recommendation requires additional markup in the
choices or itemset to allow the presentation of a direct user-input
area.
The only markup necessary is in the select element itself: <select
ref="my:flavors" enumeration="open">...</select>.
 
I do think that the attribute @enumeration should give your
implementation enough information to know to give the user a choice
between the choices/item and the direct user-input.  How your
presentation chooses to indicate that these are alternatives is up to
you.  One mechanism common on desktop/display/keyboard implementations
is the "combo-box".
 
As an alternative to "combo-boxes," in the past couple of years, a more
flexible presentation has been used in some web sites: instead of using
a pull-down menu, these sites use a type-in field, and use the choices
(or itemset) to provide auto-completion, yet still allow alternate data
to be entered. In HTML4, this requires JavaScript, but in XForms, I
believe that it is just the @enumeration='open' attribute.
 
Please see my sample at 
http://lists.w3.org/Archives/Public/www-forms/2006May/0122.html
<http://lists.w3.org/Archives/Public/www-forms/2006May/0122.html>  and
think about using it to present your select example below (though with
enumeration="open" and no empty value item).
 
There would be additional markup required in the form itself (events,
another instance, etc.) if you wanted to have the set of available
choices depend on what had been typed in the field so far and change
incrementally, but for your example with its static set of choices, just
@enumeration='open' should be enough.
 
Thank you,
Leighn.


________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of Rafael Benito
Sent: Thursday, June 29, 2006 7:10 AM
To: www-forms@w3.org
Subject: Select with open selection


 	

Hi,

Xforms 1.0 Recommendation in Sections 8.1.10 and 8.1.11 states for
selection="open" that "Free entry text is handled the same as form
control input 8.1.2 The input Element, possibly in multiplicity."

IMO, id does not state clearly what the actual XML syntaxis is for this
situation and should be clarified. In our implementation we assume that
an empty value element means that the option is open, and then, treat it
as an input element for presentation.

 

For example, <select ref="my:flavors">

                        <label>Flavors</label>

                            <choices>

                                <item>

                                    <label>Vanilla</label>

                                    <value>v</value>

                                </item> 

                                <item>

                                    <label>Strawberry</label>

                                    <value>s</value>

                                </item>

                                <item> 

                                    <label>Chocolate</label> 

                                    <value>c</value> 

                                </item>

                                <item>

                                    <label>Your choice</label>

                                    <value/>

                                 </item>

                            </choices>

                     </select>

would allow the user to enter "mango"

Regards,

Rafael Benito

Received on Thursday, 29 June 2006 16:56:08 UTC