Posted by
Alessandro Vernet on
URL: https://discuss.orbeon.com/Change-Default-font-color-style-for-readonly-field-tp32659p32664.html
Hi Nelson,
On 2/4/07, Nelson Tsang <
[hidden email]> wrote:
> Yes, I'm thinking of the input fields (xforms:input). The case is, for
> example, I have some
> fields which do the auto calculation in the form which is make read-only.
> However, it become
> grey out that is not what I want (since the grey color is a little bit hard
> to read in my form.)
You can do this with CSS, by adding to your page, in the <xhtml:head>:
<xhtml:style type="text/css">
.xforms-readonly input { background: white; color: black; }
</xhtml:style>
This changes the way the browser renders disabled text fields. But the
browser renders disabled text fields like this for a reason: it give a
cue to the end user that the value cannot be modified. So I am
wondering if in this case using an <xforms:output> is not a better
option.
> also, for another example, user will read the form in read-only mode, the
> entire form cannot be
> changed, in this case, the text in the form become light grey. it is hard to
> read and not nice for
> the user.
The "view readonly" in the "Government Forms" example does this with
the xxforms:readonly-appearance attribute on <xforms:model>. This is a
simple way to create a read-only view a form (for instance for
printing) without having to spend to much time on styling. See for
instance how this attribute is used in
resources\apps\forms\detail\detail-view.xhtml.
Alex
--
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
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws