17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1661 Views |
-
RequiredFields() on a LiteralField?

1 November 2007 at 5:58am
Hi Guys,
Can you use RequiredFields() on a LiteralField?
Here is my literalfield:
new LiteralField("Comments", "<label class='left'>Comments:</label><br //><textarea name='Comments' rows='5' cols='20'></textarea>")
Thanks,
Todd
-
Re: RequiredFields() on a LiteralField?

1 November 2007 at 8:22am
Possibly, but I'm not sure - why not use a TextareaField?
-
Re: RequiredFields() on a LiteralField?

1 November 2007 at 8:35am
Hi Sam,
I would. But there would be formatting issues, unless you can tell me how to add a <br /> between "Comments:" and the textarea.
Todd
-
Re: RequiredFields() on a LiteralField?

1 November 2007 at 9:26am Last edited: 1 November 2007 9:27am
Instead of adding a <br /> you can use CSS to make the width of the label long enough that it pushes down the textarea field below the label. I assume that's what you're after.
Most likely it would be, this, on a TextareaField (assuming you called the field 'Comments'):
form #Comments label {
width: 100%;
display: block;
}Cheers,
Sean -
Re: RequiredFields() on a LiteralField?

1 November 2007 at 4:58pm
Hi Sean,
I'll give this a try.
Many thanks.
Todd
| 1661 Views | ||
|
Page:
1
|
Go to Top |



