【问题标题】:Value that is dragged & dropped into Password & Confirm Password field appears as plain text拖放到密码和确认密码字段中的值显示为纯文本
【发布时间】:2013-03-11 21:12:51
【问题描述】:

我在注册页面中使用了占位符。在那个密码和确认密码字段中。如果我们将一些值拖放到密码字段中,密码字段没有加密,它正在显示该值。

在 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。看不到的代码很难调试。
  • 检查输入 type="password" 是否如@dineshkmar所说的那样
  • 这是twig模板文件,是的,我在注册表中的密码字段类型中提到了密码

标签: jquery passwords placeholder


【解决方案1】:

检查您将输入字段类型定义为“密码”

<input type="password">

【讨论】:

  • 是的,我已经提到过了。我正在使用 symfony2 和 twig 模板。无论如何感谢您的帮助。
猜你喜欢
  • 2017-01-27
  • 2017-09-01
  • 2012-12-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-24
  • 1970-01-01
相关资源
最近更新 更多