开发者

give different widths to different text fields from a form-symfony

I have something like this: <?php echo $form['nome']->renderRow(); ?>. this gives me the text field, the label and the开发者_如何学运维 error message. i need to give different widths to each text field in css. how do i do that?


Instead of using ->renderRow();, you could break it down into component parts, something like this:

<?php echo $form['name']->renderLabel() ?>
<?php echo $form['name']->renderError() ?>
<?php echo $form['name'] ?>

Then you could wrap those in divs with class or id tags to style accordingly, somethinkg like

<div class="nameLabel">
    <?php echo $form['name']->renderLabel() ?>
</div>

etc.

Here's a good resource that might help: http://www.symfony-project.org/forms/1_4/en/03-Forms-for-web-Designers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜