2
我在注册页面中使用占位符。在那个密码和确认密码字段是存在的。如果我们将一些值拖放到密码字段中,则密码字段不是加密的,而是显示值。拖放到“密码和确认密码”字段中的值显示为纯文本
在regForm,
->add('password','password',array('property_path'=>false,'attr'=>array('placeholder'=>'Password')))
->add('confirmPassword','password',array('property_path'=>false,'attr'=>array('placeholder'=>'Confirm password')))
In twigtemplate,
{{ form_widget(form.password) }}
{{ form_widget(form.confirmPassword) }}
$(function() {
// Invoke the plugin
$('input, textarea').placeholder();
var html;
if (html) {
$('<p class="note">' + html + '</p>').insertAfter('form');
}
});
安置自己的HTML和JavaScript。很难调试你看不到的代码。 – Blender 2013-03-22 05:09:21
检查是否输入类型=“密码”作为什么@dineshkmar说 – BizApps 2013-03-22 05:30:24
它是树枝模板文件和是啊我已经提到了密码字段中的密码类型的密码字段 – pinku 2013-03-22 05:41:21