Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
验证Magento中预填充的联系人表单字段失败_Magento_Magento 1.7 - Fatal编程技术网

验证Magento中预填充的联系人表单字段失败

验证Magento中预填充的联系人表单字段失败,magento,magento-1.7,Magento,Magento 1.7,我的Magento联系人表单预先填充了字段名,但没有标记 <input name="name" id="name" value="Name" class="required-entry input-text" type="text" /> 由于字段已预填充,验证“必需输入”失败。 有没有一种不太脏的方法可以让验证使用预先填充的值?试着使用。制作预填充文本的步骤 <form action="demo_form.asp"> <input type="text"

我的Magento联系人表单预先填充了字段名,但没有标记

<input name="name" id="name" value="Name" class="required-entry input-text" type="text" />

由于字段已预填充,验证“必需输入”失败。 有没有一种不太脏的方法可以让验证使用预先填充的值?

试着使用。制作预填充文本的步骤

<form action="demo_form.asp">
  <input type="text" name="fname" placeholder="First name"><br>
  <input type="text" name="lname" placeholder="Last name"><br>
  <input type="submit" value="Submit">
</form>




这肯定会对您有所帮助。

您为什么要预填充?这是为了文本框的类似标签吗?@cari,很高兴能帮助你,sry,我不能接受这个答案,因为它在ie9中不起作用:-/ok,我现在就接受它,并尝试用jquery占位符插件@ok解决ie9问题,但如果不考虑ie9,我们应该使用默认的html5标记,而不是将exra库加载到页面上,ie9仍然是每个严肃网站的关注点-(