cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Sieranski <greg.sieran...@quoininc.com>
Subject Re: Cocoon form
Date Tue, 08 May 2007 14:26:53 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Amon wrote:
<blockquote cite="midBAY119-W146A3A8A43C18277F962BDA440@phx.gbl"
 type="cite">
  <style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
  </style>Best users,<br>
  <br>
I want to customize the styling when a validation of a field return
false (Cocoon forms). Now i can only see and "!" sign&nbsp;next the the
input field&nbsp;and when i click on it it show an alert box. I don't want
that. I want to change the color of my field and put a 'help'' div next
to my field. How can i accomplice this?&nbsp;<br>
  <br>
I am using cocoon 2.1.10.&nbsp;<br>
  <br>
Thanks in advance,<br>
  <br>
Amon<br>
  <br>
  <hr>Get the new Windows Live Messenger! <a
 href="http://get.live.com/messenger/overview" target="_new">Try it!</a></blockquote>
An easier solution might be to use the cocoon &lt;fi:help&gt; tag in
the form template file. The tag will place an img with a ? next to your
field.&nbsp; You can then customize the message however you want and when
the user clicks on the ? they see your help message. Here is an example:<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;fi:group&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;fi:styling type="fieldset" layout="rows"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;fi:items&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ft:widget id="query"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;fi:help&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;p&gt;Type one or more descriptive words
for the desired information.&lt;/p&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;p&gt;Make sure there is a space between
each keyword.&lt;/p&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;/fi:help&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;/fi:items&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;/fi:group&gt;<br>
<br>
If you want to change the ! point then have a look at the
forms-field-styling.xsl file in cocoon. This is where many of the
default cocoon form styles are done.<br>
<br>
Regards,<br>
Greg<br>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message