hi Ian,
usually I am using the list-widget,
$widget_schema->setOption('form_formatter', 'list');
so every form is generated as a list. which you put in your own <ul>.
You can give the <ul>-tag an id like this.
<ul id="myForm">
<?php print $form; ?>
</ul>
And the form will generated like this:
<ul id="myForm">
<li><label>message</label><input type="message" name="form[message]"
id="form_message" /></li>
</ul>
This means, your designer can use the Ids to make his css working.
Because every <label> <li> or form-tag got one.
For "my" designers is this great, the love to work with Ids.
Otherwise you can add classes as well to the form-tags.
$this->widgetSchema['message']->setAttribute('class', 'hallo');
Bests
Susan
Slick Rick schrieb:
> I'm trying to take advantage of the new widget system, but I'm having a
> hard time trying to figure out where the line between view and
> controller is drawn. For instance, if I design a form in my controller,
> how can I make it easy for my designers to apply CSS? If I have a table
> with several rows, how can I apply a specific CSS class to 1 of those
> rows? The only way I can see to do it is to render() each field
> individually inside the template, which bypasses embedForm()
> functionality. Is there a "best practices" way to implement a form and
> display it in a template, so as not to make it too difficult for the
> designer to style it?
>
> Thanks for the help!
>
> -- Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---