Laravel Blade 模板中的表单::密码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23425967/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 09:27:28  来源:igfitidea点击:

Form::password in Laravel Blade Templates

laravellaravel-4blade

提问by Junaid Farooq

I was trying to create a password field in the form in Laravel Blade templates but the output doesn't let me enter anything and it's not showing any placeholder either. The code doesn't cause any error.

我试图在 Laravel Blade 模板的表单中创建一个密码字段,但输出不允许我输入任何内容,也没有显示任何占位符。该代码不会导致任何错误。

Form:

形式:

{{ Form::open(array('class'=> 'forming')) }}
     {{ Form::text('username','Username',array('class' => 'insi')); }}<br>
     {{ Form::password('password',array('placeholder'=>'Password','class' => 'insi')); }}
{{ Form::close() }}

and the output is like that. Any help?

输出就是这样。有什么帮助吗?

http://i1289.photobucket.com/albums/b503/darulehsan031/dddff_zps4f4ad69e.png

http://i1289.photobucket.com/albums/b503/darulehsan031/dddff_zps4f4ad69e.png

Second Input form is for password.

第二个输入表单是密码。

采纳答案by Antonio Carlos Ribeiro

We are not seeing your generated HTML, but usually those problems are related to your HTML. For instance, you are using a CSS class 'insi', which may not letting you see the password characters.

我们没有看到您生成的 HTML,但通常这些问题与您的 HTML 相关。例如,您正在使用 CSS 类“insi”,它可能不会让您看到密码字符。

To do a test remove/disable your CSS files from your main HTML and it probably will work fine.

要进行测试,请从主 HTML 中删除/禁用 CSS 文件,它可能会正常工作。