mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
83 lines
3.1 KiB
HTML
Executable File
83 lines
3.1 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Basic usage</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example">
|
|
<div class="demo-section k-content">
|
|
<div id="validation-success"></div>
|
|
|
|
<form id="exampleform"></form>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
var validationSuccess = $("#validation-success");
|
|
|
|
$("#exampleform").kendoForm({
|
|
orientation: "vertical",
|
|
formData: {
|
|
Username: "johny",
|
|
Email: "[email protected]",
|
|
Password: "pass123",
|
|
Birth: new Date(),
|
|
Agree: false
|
|
},
|
|
items: [{
|
|
type: "group",
|
|
label: "Registration Form",
|
|
items: [
|
|
{ field: "Username", label: "Username:", validation: { required: true } },
|
|
{ field: "Email", label: "Email:", validation: { required: true, email: true } },
|
|
{
|
|
field: "Password",
|
|
label: "Password:",
|
|
validation: { required: true },
|
|
hint: "Hint: enter alphanumeric characters only.",
|
|
editor: function(container, options) {
|
|
container.append($("<input type='password' class='k-textbox k-valid' id='Password' name='Password' title='Password' required='required' autocomplete='off' aria-labelledby='Password-form-label' data-bind='value:Password' aria-describedby='Password-form-hint'>"));
|
|
}
|
|
},
|
|
{ field: "Birth", label: { text: "Date of birth:", optional: true } },
|
|
{ field: "Agree", label: "Agree to Terms:", validation: { required: true } }
|
|
]
|
|
}],
|
|
validateField: function(e) {
|
|
validationSuccess.html("");
|
|
},
|
|
submit: function(e) {
|
|
e.preventDefault();
|
|
validationSuccess.html("<div class='k-messagebox k-messagebox-success'>Form data is valid!</div>");
|
|
},
|
|
clear: function(ev) {
|
|
validationSuccess.html("");
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|