Hi Alain,
I wouldn't say that I'm hurry because I use efficiently XSLTForms since 3 years
without this option but now I start designing new forms with fields like tags
or symbols. They allow users to type any existing (or new) keyword but open
select1 could help to auto-complete values and avoid typos.
I also tried to activate browsers internal auto-complete feature but since
input controls are not inside <form/> markup it doesn't works.
Thank you for your interest.
Benoit
Le 10/11/2014 19:06, [email protected] a écrit :
Hi Benoit,
This is an interesting suggestion and browser support does not sound bad with
IE10, for example.
I need some time for implementing and testing this. Are you in a hurry?
Thanks!
--Alain
> Le 8 novembre 2014 à 12:10, Benoit VINCENT <[email protected]> a
> écrit :
>
>
>
> Hi Alain,
>
> It would be very useful for our application to have the <xf:select1
> selection="open" /> implemented in XSLTForms. I searched on the web
> and found that, now, with HTML 5 it's very easy to have a combobox
> without coding anything in javascript :
>
> example :
>
> <input type="text" list="browsers" />
> <datalist id="browsers" >
> <option> Google </option>
> <option> IE9 </option>
> </datalist>
>
> I think it could be possible to implement <xf:select1 selection="open" /> in
> XSLTForms by merging the existing code of xf:input (for the field)
> and the xf:select1 (for the options list). I tried some quick and dirty tests
> and it seems to work for modern browsers.
> I try to generate the HTML with a template like this :
>
> <xsl:template xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
> match="xforms:select1[@selection='open']" priority="3">
> <xsl:param name="appearance" select="false()"/>
> <xsl:param name="parentworkid"/>
> <xsl:param name="workid" select="concat(position(),'_',$parentworkid)"/>
> <xsl:call-template name="field">
> <xsl:with-param name="workid" select="$workid"/>
> <xsl:with-param name="appearance" select="$appearance"/>
> <xsl:with-param name="body">
> <input type="text" list="datalist-{$workid}">
> <xsl:call-template name="comun"/>
> </input>
> <datalist id="datalist-{$workid}">
> <xsl:apply-templates select="node()" mode="item">
> <xsl:with-param name="parentworkid" select="$workid"/>
> </xsl:apply-templates>
> </datalist>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:template>
>
>
> but I have not enough skills to modify the javascript generation code. I'm
> stuck !
>
> Do you think that it would be possible to have this feature in XSLTForms (at
> least for HTML 5 browser)?
>
> Thank you for your help.
>
> Benoit
>
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Xsltforms-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support