如何添加类到Laravel 4 Forms [英] How to add classes to Laravel 4 Forms

查看:166
本文介绍了如何添加类到Laravel 4 Forms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许,这是一个简单的答案,但我找不到任何有关这方面的文件。我已经使用Laravel 4布局了一个表单,它似乎工作正常,但现在我需要风格。如何在使用刀片时向表单添加类?

Probably, it is a simple answer but I cannot find any documentation regarding this. I have laid out a form using Laravel 4 and it seems to be working fine but now I need to style it. How can I add classes to the form when its using blade?

 {{ Form::open(array('url' => 'foo/bar')) }}



我已为表单设置了类

I have a class set up for the form and the buttons but I am not sure how to add it to the blade template.

推荐答案

您可以尝试此

{{ Form::open(array('url' => url('foo/bar'), 'class'=>'form', 'id'=>'frmFoo', 'style'=>'border:solid gray 1px')) }}

您可以添加内联样式,类,id等。

You can add inline style, class, id etc.

这篇关于如何添加类到Laravel 4 Forms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆