Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Seeking an iPad compatible required field checking JS library that leverages native HTML5 required field checking attributes

Posted on 2014-08-06
8
Medium Priority
?
668 Views
Last Modified: 2014-08-08
Can anyone here recommend a suitable required field checking JS library (ie: jQuery based or otherwise) that's iPad compatible?  

More specifically, I'm looking for something that leverages the native HTML5 required field checking attributes (ie: required="required"), .. meaning that if these attributes are encountered -- the JS library takes over and makes required attribute work in Safari on the iPad (since the required attribute does NOT work with Safari on the iPad).

Lastly -- it's important that the JS library (jQuery based or otherwise) can properly handle both checkboxes and radio buttons -- in addition to text input fields.  

Please advise.  Thanks!
- Yvan
0
Comment
Question by:egoselfaxis
  • 5
  • 2
8 Comments
 
LVL 43

Expert Comment

by:Rob
ID: 40245330
knockoutjs (http://knockoutjs.com/), I've used extensively (in conjunction with layout frameworks like bootstrap) for mobile and desktop web applications.

knockout allows you to define the logic of your application (including validation).  It does require jQuery to run.  My experience with the HTML5 validation tells me it's still in beta and I would lean on JS for now until it can prove itself to be robust across browsers and devices.  That said, you can still leverage the attributes/properties as if they were just of the "data-" attribute and include that in your logic.

If you need a demo with some of your data regarding knockout to show you how easy it is to use, just ask.
0
 
LVL 43

Expert Comment

by:Rob
ID: 40245361
This was  simple demo I did the other day for another question where a group of checkboxes were related to a radio button.  If you checked one of the boxes the parent radio should be selected, otherwise the other radio should be selected.  All done with a logic model in javascript.

http://jsbin.com/necij/2/edit?js,output
0
 
LVL 29

Expert Comment

by:fibo
ID: 40245412
Hi Rob,
Nice work.
On my Windows Phone machine, I had to change your link to http://jsbin.com/necij/2/
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Expert Comment

by:Rob
ID: 40245414
Thanks fibo. Yes it will be a bit small viewing the jsbin (code and output) on a phone so thanks for posting the demo link that only shows the output. Certainly more user friendly to see in action on mobile devices.
0
 

Author Comment

by:egoselfaxis
ID: 40245847
I'm not sure if my question was properly understood or not.  These answers don't seem to be at all related to my question.  I see no indication whatsoever that knockout JS would allow me to achieve what I'm looking for.  If I'm mistaken, could someone here please provide me with an example?

- yg
0
 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 40245864
Can anyone here recommend a suitable required field checking JS library (ie: jQuery based or otherwise) that's iPad compatible?  
I use knockoutjs and http://jqueryvalidation.org/documentation

More specifically, I'm looking for something that leverages the native HTML5 required field checking attributes (ie: required="required")
again http://jqueryvalidation.org/documentation

Lastly -- it's important that the JS library (jQuery based or otherwise) can properly handle both checkboxes and radio buttons -- in addition to text input fields.  
This is where I lean towards knockoutjs.

There isn't an off the shelf solution.  The closest you'll get at the moment is jqueryvalidation.org.  knockoutjs gives you the flexibility of building your own logic.
0
 

Author Comment

by:egoselfaxis
ID: 40248480
Rob - thank you so much!  The jQuery validation JS library is exactly what I needed.  

I'm going to take a closer look at knockoutjs to see if it might be practical for me to implement in future projects.  I would have loved to have had the time to delve into it this week, but had to get a project done for a tradeshow this weekend.  Regardless, I appreciate your help this week.

Cheers,
- Yvan
0
 
LVL 43

Expert Comment

by:Rob
ID: 40248510
Yvan,

That's great you got what you needed from the validation library.  Knockout gives you that blank slate for building your own logic into your site.  Based on the Model, View methodology it makes very robust applications for both mobile devices and desktop.  I've only discovered it myself in the last 6 months and loved using it.  Certainly worth exploring when you've got time.

Good luck with the project.

Rob
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Learn about the eCommerce marketing trends for the year ahead.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question