cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beya! <and...@jibeya.com>
Subject Re: Cform widget not being displayed
Date Mon, 15 Nov 2004 11:37:46 GMT
Roberto,
what I am saying is that the inputbox size I set to 30 is only being 
set to 5 when you view the html. What I should get is:

<input ....size="30">

instead I get

<input .....size="5">

My widget is declared as:

     <fd:field id="username" required="true">
       <fd:label>Username</fd:label>
       <fd:datatype base="string"/>
       <fd:validation>
         <fd:length min="2" max="30"/>
       </fd:validation>
     </fd:field>

In my form:

	<ft:widget id="username">
		<fi:styling size="30" class="keyinbox"/>
	</ft:widget>

Also, shouldn't the input box end with /> to be xhtml compliant ????


regards


Andrew
On 15 Nov 2004, at 11:17, Roberto wrote:

> Andrew,
> I don't know if I clearly understood your problem. I try to answer to 
> the question nr 1.
>  What I understood in CForms is that you need 2 files, one for 
> definition & one as a template so for istance I use a defLogin.xml 
> file for the definition
>  
> <?xml version="1.0" encoding="ISO-8859-1"?>
>  
> <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
>   <fd:widgets>
>  
>     <fd:field id="txtNome" required="true">
>       <fd:label>Nome:</fd:label>
>       <fd:datatype base="string"/>
>       <fd:validation>
>         <fd:length min="2"/>
>       </fd:validation>
>     </fd:field>
>  
>     <fd:field id="txtPassword" required="true">
>       <fd:label>Password:</fd:label>
>       <fd:datatype base="string"/>
>       <fd:validation>
>         <fd:length min="5" max="20"/>
>       </fd:validation>
>     </fd:field>
>  
>   </fd:widgets>
> </fd:form>
> And the template ... (just a snippet)
>  
> <p class="label"><ft:widget-label id="txtNome" /></p>
> <ft:widget id="txtNome">
>    <fi:styling class="txt"/>
> </ft:widget>
>  
> <p class="label"><ft:widget-label id="txtPassword"/></p>
> <ft:widget id="txtPassword">
>   <fi:styling type="password"/>
> <fi:styling class="txtPwd"/>
> </ft:widget>
>  
> & then I use the .css file to format the output.
>  
> .txt{
>   font-family:"Verdana", Helvetica, sans-serif;
>   color:#000077;
>   background:#FFCC00;
>   text-align:left;
>   cursor:text;
>   width:170px;
>   border : 1px #aaaaaa solid
> }
>  
> In this case I can have the size of the field how long as I want.
>  
>  
> In your example, you declare a widget with "username" id, but then you 
> refer to an input called "password", so Im a little confused...
>  
> Since Im a newbie, I don't know about question nr.2 & 3, sorry.
>  
> Hope that I could help you.
>  
> Ciao
> Roberto
>  
>  
>  
>  
> ----- Original Message -----
>  From: beya!
> To: users@cocoon.apache.org
> Sent: Monday, November 15, 2004 11:37 AM
> Subject: Re: Cform widget not being displayed
>
> Roberto,
> thanks for that information it worked fine. I am experiencing another 
> problem now. I have declared my widget styling as:
>
> <ft:widget id="username">
> <fi:styling size="30" class="keyinbox"/>
> </ft:widget>
> So I want the input box to have a size of 30 but the size in the html 
> is 5:
>
> <input name="password" id="password" value="" title="" type="password" 
> size="5" class="keyinbox"><span class="forms-field-required"> * 
> </span>
>
> 1. How do I make the size of the box 30?
>

Mime
View raw message