Standard appearanceBy default, the text area control is rendered as a regular single-line input fields: AttributesWith the standard appearance, the following attributes are available:
Example:
Placeholder for label and hint[SINCE: 2012-01-19] The label or hint associated with <xforms:input> may have the minimal appearance:
This causes either the label or the hint to appear on the background of the field when it is empty: Orbeon Forms leverages the HTML 5 placeholder attribute for browsers that support it (Firefox 3.5+, Chrome, Safari, Opera), and simulates the HTML 5 placeholder functionality in JavaScript for browsers that don't support it (all versions of IE). In that case, you can customize how the placeholder is displayed by overriding the CSS class xforms-placeholder.NOTE: The xxforms:placeholder appearance can also be used instead of the minimal appearance. Initially (2011-11) the feature only supported xxforms:placeholder and support for minimal was added upon discussion with the W3C Forms Working Group.Appearance based on type The way the XForms input control is be rendered on the page depends on the type of the node it is bound to:date, time, and dateTime typesDate picker configurationWhen using the YUI widget, you can choose if you want 2 months to be displayed instead of one, and if users should be able to quickly navigate to a specific year and month by setting theoxf.xforms.datepicker.navigator property.Make sure not to use the date picker inside an <xhtml:p>, as this will result in a "Unknown runtime error" on IE 6, 7, and 8, as IE is unable to render the markup for the date picker inside an <xhtml:p>.Smart date and time formatThe date and time fields allow you to type a date and a time in a number of formats, as listed below. When the field looses the focus, the value you entered is parsed and, if recognized, replaced with a value in a a "canonical format". You can choose what canonical format is used by changing the value of the oxf.xforms.format.input.date and oxf.xforms.format.input.time properties.
Two digits yearsIf you type in a date field a year with only two digits (say 5/20/10), the control will assume that you intended to type a year in the twentieth or twenty first century, rather than a year in the first century. It will convert the two-digit year you typed into a four digits year by taking the corresponding year in either the twentieth or twenty first century based on which one is closest to the current year. So for instance, if the current year is 2020:
Date picker internationalizationBy default, the months and days of the week are in English in the date picker (as shown in the screenshot above). You can change this by setting the value of the lang attribute on the <html> element of the page. The value of the attribute two-letter ISO 639-1 language code. For instance with <html lang="fr"> months and week days will be shown in French, for instance: Currently, 3 languages are supported: English (the default), French, and Spanish. Note that the changing the language also changes which day of the week is shown first in the calendar: in English, Sunday is shown first; with French and Spanish, Monday is shown first. Date picker in scrollable areaIf you are using the date picker in an area of your page which is scrollable (e.g.<div style="overflow: scroll">), if users scroll in that area while the date picker is open, you want the date picker to be anchored to the field it is related to and to scroll with the content of the scrollable area (versus being attached to the page, and only scrolling if the page is scrolled). For this to work, assuming you have the class scrollable-area on your scrollable area, you need to add the following CSS:.scrollable-area { position: relative }On iOS[SINCE 2011-11-22] On iOS (iPhone, iPad, iPod touch), inputs bound to nodes of type xs:date, xs:time, or xs:dateTime are rendered using the iOS 5 browser native date or time widgets, which iOS users are accustomed to, and which provides a better usability, especially on the smaler screen iPhone and iPod touch.Limitations
|









