2016-01-28 31 views
0

我知道这个问题不是特定于编程问题,而是关于编程和一般设计。iPad上的表单验证和设计

我在写单个iPad设备上使用的web应用程序(目前无论如何),而且我遇到了两件事情:表单验证和表单设计。

首先,我无法使用HTML5在iPad上使用表单验证。它可以在PC上正常工作,但对iPad上的safari或chrome没有任何影响。提交表单不会触发验证错误,并且CSS不会识别:invalid伪标记。我如何工作? h5Validate for jquery似乎不起作用。这里是我的代码:

 <form action="/contact_submit.php" method="post" autocomplete="off"> 
      <label for="name">Name:</label> 
      <input id="name" name="name" type="text" required autocorrect="off" autocaptialize="words" autofocus maxlength="30" inputmode="latin-name" placeholder="Full Name"> 
      <label for="email">Email:</label> 
      <input id="email" name="email" type="email" autocorrect="off" maxlength="75" inputmode="email" placeholder="[email protected]"> 
      <label for="tel">Phone:</label> 
      <input id="tel" name="tel" type="tel" required inputmode="tel" maxlength="11" placeholder="2285555555"> 
      <label for="message">Message:</label> 
      <textarea id="message" name="message" autocapitalize="sentences" placeholder="Any additional information you'd like us to know"></textarea> 
      <button id="submit" type="submit">Send</button> 
     </form> 

其次,多侧面的问题的,我不是在形式设计的创造性方面很大,所以在那里为窗体布局任何的jQuery或其他预开发的解决方案上的售货亭?

回答

0

我最终发现,因为iPad没有正确使用表单验证,所以我必须手动将验证类添加到h5validation脚本中,如文档中所述。