Web form control to select the number of people
Just download the latest source ZIP and extract the plugin assets (css and js files from dist folder) into your project.
Simple web page (humanpicker was init via data-control attribute):
<html>
<head>
<link href="jquery.humanpicker.min.css" rel="stylesheet">
</head>
<body>
<form id="form">
<div id="humanpickerdemo" data-control="humanpicker"></div>
</form>
<script src="jquery.js"></script>
<script src="jquery.humanpicker.min.js"></script>
</body>
</html>
Control generates standard html hidden inputs. For example:
<input name="adults" type="hidden" value="2">
<input name="kids" type="hidden" value="2">
<input name="kidsAges[]" type="hidden" value="3">
<input name="kidsAges[]" type="hidden" value="2">
Get form values example via jquery:
$("#form").serialize();
The result:
adults=2&kids=2&kidsAges[]=3&kidsAges[]=2
MIT © xtratio