Form Builder Labels (xform:label) and XHTML rendering

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

Form Builder Labels (xform:label) and XHTML rendering

lazx
This post was updated on .
For a question that I am creating in form builder, some of the characters need to be bold, others need to be red - etc.

When trying to render some XHTML in an xforms:label, it is converted to text.  Has there been any advances in rendering xhtml in labels since this thread: http://www.nabble.com/XHTML-in-labels-td11176889.html#a11176889

xforms:output works fine, but it would be nice to get this working with labels/hint/help/alert too.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Form Builder Labels (xform:label) and XHTML rendering

Erik Bruchez
Administrator
Yes, the XForms engine supports HTML in labels (and help, hint,  
alert), but Form Builder only handles plain text for those at the  
moment.

-Erik

On Jul 7, 2008, at 1:17 PM, lazx wrote:

>
> For a question that I am creating in form builder, some of the  
> characters
> need to be bold, others need to be red - etc.
>
> When trying to render some XHTML in an xforms:label, it is converted  
> to
> text.  Has there been any advances in rendering xhtml in labels  
> since this
> thread: http://www.nabble.com/XHTML-in-labels- 
> td11176889.html#a11176889
>
> xforms:output works fine, but it would be nice to get this working  
> with
> labels/hint/help/alert too.
>
> Thank you.
> --
> View this message in context: http://www.nabble.com/Form-Builder-Labels-%28xform%3Alabel%29-and-XHTML-rendering-tp18285746p18285746.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Form Builder Labels (xform:label) and XHTML rendering

lazx
Hi Erik,

Thank you for your response!

Can the form runner (FR) environment render html in label/help/hint/alert?

For example, I have tried something like the following:

instance:
<html_label><xhtml:b>Bold text</xhtml:b></html_label>

form:
<label ref="saxon:serialize('$instance/html_label', 'html')"/>

but the form runner outputs the label as xml (or xhtml) - ie, the namespaces of the label are also shown, and the text is not bold.

Will have a better example + output for you tomorrow, just hoping you can maybe give me some pointers or see what I am doing wrong.

Thanks.


Erik Bruchez wrote
Yes, the XForms engine supports HTML in labels (and help, hint,  
alert), but Form Builder only handles plain text for those at the  
moment.

-Erik

On Jul 7, 2008, at 1:17 PM, lazx wrote:

>
> For a question that I am creating in form builder, some of the  
> characters
> need to be bold, others need to be red - etc.
>
> When trying to render some XHTML in an xforms:label, it is converted  
> to
> text.  Has there been any advances in rendering xhtml in labels  
> since this
> thread: http://www.nabble.com/XHTML-in-labels- 
> td11176889.html#a11176889
>
> xforms:output works fine, but it would be nice to get this working  
> with
> labels/hint/help/alert too.
>
> Thank you.
> --
> View this message in context: http://www.nabble.com/Form-Builder-Labels-%28xform%3Alabel%29-and-XHTML-rendering-tp18285746p18285746.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Form Builder Labels (xform:label) and XHTML rendering

Alessandro Vernet
Administrator
On Mon, Jul 7, 2008 at 7:53 PM, lazx <[hidden email]> wrote:
> instance:
> <html_label><xhtml:b>Bold text</xhtml:b></html_label>
>
> form:
> <label ref="saxon:serialize('$instance/html_label', 'html')"/>

You would need to have:

<xforms:label>
    <xforms:output mediatype="text/html" ref="$instance/html_label"/>
</xforms:label>

Note that you can use this only if are editing the XForms that runs in
FR "by hand" (i.e. not with Form Buidler).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Form Builder Labels (xform:label) and XHTML rendering

Ronald van Kuijk-2
In reply to this post by Erik Bruchez

Wouldn't it be better if the builder supported assigning custom class
attributes to elements so they can  be styled with CSS instead of supporting
html? Sounds 'oldschool' and not retro (yet ;-))


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Form Builder Labels (xform:label) and XHTML rendering

Erik Bruchez
Administrator
Ronald,

What do you mean by "instead of supporting HTML"?

Supporting custom classes would be a possibility. At the moment you  
can use control ids and the built-in control classes.

There is a long-standing RFE to change the HTML layout of the controls  
to use an enclosing <span> or <div> to facilitate styling:

   http://tinyurl.com/6q7jsg

-Erik

On Aug 6, 2008, at 4:47 AM, <[hidden email]> <[hidden email]
 > wrote:

>
> Wouldn't it be better if the builder supported assigning custom class
> attributes to elements so they can  be styled with CSS instead of  
> supporting
> html? Sounds 'oldschool' and not retro (yet ;-))

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Form Builder Labels (xform:label) and XHTML rendering

Ronald van Kuijk-2

instead of putting html in the label elements and certainly no bold, italic, h1
or whaterver tag ;-)

The tiny url does not work btw, I get to an unknown page.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Form Builder Labels (xform:label) and XHTML rendering

Erik Bruchez
Administrator
> instead of putting html in the label elements and certainly no bold,  
> italic, h1
> or whaterver tag ;-)

Right, you wouldn't want to do that ;-)

> The tiny url does not work btw, I get to an unknown page.

Sorry about that, here is a new link:

   http://tinyurl.com/6nra6u

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws