Hello,
I'm using dynamic bind to switch the type(string/date/dateTime) of a input element, which has a "minimal" hint as a placeholder. The problem is that, the hint gets lost if you switch the type from "date" to "string". Here are the codes based on input-enter.xhtml: <xh:html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xh:head> <xh:title>XForms Enter Key</xh:title> <xf:model> <xf:instance id="instance"> <instance> <textfield type=""/> </instance> </xf:instance> <xf:bind nodeset="textfield[@type = '']" type="xs:string"/> <xf:bind nodeset="textfield[@type = 'date']" type="xf:date"/> <xf:bind nodeset="textfield[@type = 'dateTime']" type="xf:dateTime"/> </xf:model> </xh:head> <xh:body> <xh:p> <xf:input ref="textfield" id="control-1"> <xf:label>Press enter in the text field: </xf:label> <xf:hint appearance="minimal">this is a hint</xf:hint> </xf:input> </xh:p> <xh:p> textfield: <xf:output ref="textfield"/> </xh:p> <xh:p> <xf:select1 ref="textfield/@type"> <xf:item> <xf:label>Date</xf:label> <xf:value>date</xf:value> </xf:item> <xf:item> <xf:label>DateTime</xf:label> <xf:value>dateTime</xf:value> </xf:item> <xf:item> <xf:label>String</xf:label> <xf:value></xf:value> </xf:item> <xf:action ev:event="xforms-value-changed"> <xf:rebuild/> </xf:action> </xf:select1> </xh:p> <xh:p> type: <xf:output ref="textfield/@type"/> </xh:p> <xh:p> <xf:textarea ref="textfield" incremental="true"> <xf:label>Has the same value as the text field: </xf:label> </xf:textarea> </xh:p> </xh:body> </xh:html> |
Administrator
|
Hi,
Indeed. We are aware of issues with the minimal appearance for the label/hint, for instance when used in a repeat. For the specific issue you have, for now I added this bug: https://github.com/orbeon/orbeon-forms/issues/1175 This will most likely be fixed with the changes we are currently working on to improve how tooltips for hints are shown: https://github.com/orbeon/orbeon-forms/issues/1081 So, stay tuned! Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
OK! Thanks for your reply.
|
In reply to this post by Alessandro Vernet
Hello Alex,
I just read this LHHA.caffee Could I use this to resolve my problem about lost of hint after type changes? I'm working on 4.0.1. Thanks! |
Administrator
|
Hi,
LHHA.coffee is part of the work we are doing for #1081, but it isn't used at this point, so this isn't a solution for you just yet. But we're getting there: we should have #1081 implemented in the next few weeks, and with this I'm hoping we'll fix the issue you reported (#1175) at the same time. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |