Placeholder in fr:date

19 views
Skip to first unread message

julien bittard

unread,
Sep 4, 2025, 1:04:45 PMSep 4
to Orbeon Forms
Hello,
With version 2024.1, the "fr:date" fields now automatically display a placeholder that should use the expected format, for example: "DD/MM/YYYY"

However, on my screens developed in Xforms, what only appears is: "//"

The format configurations I applied are:
<property as="xs:string" name="oxf.xforms.format.output.date">
if (. castable as xs:date) then format-date(xs:date(.), '[D01]/[M01]/[Y]', 'fr', (), ()) else .
</property>
<property as="xs:string" name="oxf.xforms.format.input.time">
[H]:[m]:[s]
</property>
<property as="xs:string" name="oxf.xforms.format.input.date" value="[D01]/[M01]/[Y]"/>
<property as="xs:string" name="oxf.xforms.xbl.fr.date.output-format" value="[D01]/[M01]/[Y]"/>

<property
as="xs:string"
name="oxf.xforms.xbl.fr.date.week-start-day.*.*"
value="monday"/>

<property
as="xs:string"
name="oxf.xforms.xbl.fr.date.native-picker.*.*"
value="always"/>

And the xhtml page has the "lang="fr"" attribute.

How can I configure this placeholder correctly?

Thank You
Julien

julien bittard

unread,
Sep 4, 2025, 1:04:50 PMSep 4
to Orbeon Forms

Hello, 

With version 2024.1, the "fr:date" fields now automatically display a placeholder that should use the expected format, for example: "DD/MM/YYYY".
However, on my screens developed in Xforms, what only appears is: "//" 

The format configurations I applied are:
<property as="xs:string" name="oxf.xforms.format.output.date">
if (. castable as xs:date) then format-date(xs:date(.), '[D01]/[M01]/[Y]', 'fr', (), ()) else .
</property>

<property as="xs:string" name="oxf.xforms.format.input.time">
[H]:[m]:[s]
</property>

<property as="xs:string" name="oxf.xforms.format.input.date" value="[D01]/[M01]/[Y]"/>
<property as="xs:string" name="oxf.xforms.xbl.fr.date.output-format" value="[D01]/[M01]/[Y]"/>


<property
as="xs:string"
name="oxf.xforms.xbl.fr.date.week-start-day.*.*"
value="monday"/>

<property
as="xs:string"
name="oxf.xforms.xbl.fr.date.native-picker.*.*"
value="always"/>

And the xhtml page has the lang="fr" attribute

Alessandro Vernet

unread,
Sep 4, 2025, 9:20:58 PMSep 4
to orb...@googlegroups.com
Hi Julien,

I suspect this is happening because the date component cannot determine the current language. Could you try adding `xml:lang="en"` to your root `<xh:html>` element, if you don't already have one?

-Alex

Bittard, Julien

unread,
Sep 5, 2025, 2:45:36 AMSep 5
to orb...@googlegroups.com

Hi Alex,

 

Thanks, that's exactly it.

Until now, we indicated the language by simply setting lang="fr" so that the date picker would be in the correct format and in the correct language.

Did adding "xml:" become mandatory with 2024? Or was that already the case before?

 

Thanks.

 

Julien

 

De : 'Alessandro Vernet' via Orbeon Forms <orb...@googlegroups.com>
Envoyé : vendredi 5 septembre 2025 03:21
À : orb...@googlegroups.com
Objet : Re: [orbeon] Placeholder in fr:date

 

EXTERNAL SENDER: Do not click any links or open any attachments unless you trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:
Ne cliquez sur aucun lien et n’ouvrez aucune pièce jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez l'assurance que le contenu provient d'une source sûre.

 

Hi Julien,

I suspect this is happening because the date component cannot determine the current language. Could you try adding `xml:lang="en"` to your root `<xh:html>` element, if you don't already have one?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/orbeon/CANrzKkmgLZYZjvuB0RTiyg-DefzzfdtOU8JCjyRpuVppL%2BPE0w%40mail.gmail.com.

Alessandro Vernet

unread,
Sep 5, 2025, 3:07:58 PMSep 5
to orb...@googlegroups.com
Hi Julien,

Perfect, I'm glad adding `xml:lang="en"` (or any language you need) worked. I don't think this has changed. The function `xxf:r()` is used by `date.xbl` to get the value of a resource. This is an extension function at the XForms level. Form Runner provides higher-level language features, such as a language picker for end users, and it sets `xml:lang="en"` so the current language is available at the XForms level. What do you mean by setting `lang="fr"`?

-Alex

julien bittard

unread,
Sep 5, 2025, 5:18:56 PMSep 5
to orb...@googlegroups.com
Hi Alex

What I mean is that our pages already have the language definition in the root tag via the attribute: lang = "fr" without namespace, but this is not enough for the date picker to display the correct format in placeholder. We need to add the xml namespace: xml:lang = "fr"


Julien 

Le 5 sept. 2025 à 21:08, 'Alessandro Vernet' via Orbeon Forms <orb...@googlegroups.com> a écrit :


Hi Julien,

Perfect, I'm glad adding `xml:lang="en"` (or any language you need) worked. I don't think this has changed. The function `xxf:r()` is used by `date.xbl` to get the value of a resource. This is an extension function at the XForms level. Form Runner provides higher-level language features, such as a language picker for end users, and it sets `xml:lang="en"` so the current language is available at the XForms level. What do you mean by setting `lang="fr"`?

-Alex

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/QJnZrSL4em4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/orbeon/CANrzKkmCsxZ7tMoBLKOcH1NPXfe%3DFQ4CmojQvd8T0PM%3DadCCYw%40mail.gmail.com.

Alessandro Vernet

unread,
Sep 5, 2025, 7:13:54 PMSep 5
to orb...@googlegroups.com
Hi Julien,

Indeed, only `xml:lang` is used to determine the current language, not the plain `lang`. I don't recall this ever changing, but memory is fallible, especially mine ;).

-Alex
Reply all
Reply to author
Forward
0 new messages