Re: [Xsltforms-support] Fwd: select1 selection="open"
Brought to you by:
alain-couthures
From: <ala...@ag...> - 2014-11-10 18:06:46
|
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 <bvi...@la...> 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 > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |