Disable spellcheck on xforms:input | xforms:textarea

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Disable spellcheck on xforms:input | xforms:textarea

ahenket
I have an xforms:input that I specifically want to disable spellchecking on. In HTML5 you would add spellcheck="false".

Can I control this using xforms/xxforms too somehow? E.g. @xxf:spellcheck="false" on xforms:input?
Reply | Threaded
Open this post in threaded view
|

Re: Disable spellcheck on xforms:input | xforms:textarea

Alessandro  Vernet
Administrator
Hi Alexander,

You can use <xf:input xh:spellcheck="false"/>. In the generated HTML, this will place the spellcheck="false" on the  around the <input>, which in this case works well, as this is inherited from ancestor elements.

https://developer.mozilla.org/en-US/docs/Web/HTML/Controlling_spell_checking_in_HTML_forms

You'll let us know of this works for you,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Disable spellcheck on xforms:input | xforms:textarea

ahenket
Yes it worked. Nice, I like simple solutions.
Reply | Threaded
Open this post in threaded view
|

Re: Disable spellcheck on xforms:input | xforms:textarea

Alessandro  Vernet
Administrator
Cool, and BTW, you can do this with any attribute name (xh:foo="bar"); the attribute will be copied on the containing HTML element (foo="bar").

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet