<?php require_once '../include/header.php'; require_once '../lib/Kendo/Autoload.php'; $maskedtextbox = new \Kendo\UI\MaskedTextBox('maskedtextbox'); $maskedtextbox->mask("(999) 000-0000"); $maskedtextbox->change('onChange'); ?> <div class="demo-section"> <?php echo $maskedtextbox->render(); ?> </div> <div class="demo-section"> <h3 class="title">Console log</h3> <div class="console"></div> </div> <script> function onChange() { kendoConsole.log("Change :: " + this.value()); } </script> <style scoped> .demo-section { width: 500px; text-align: center; } .console { margin: 0;
<?php require_once '../include/header.php'; require_once '../lib/Kendo/Autoload.php'; $maskedtextbox = new \Kendo\UI\MaskedTextBox('maskedtextbox'); $maskedtextbox->mask("(999) 000-0000"); ?> <div class="demo-section k-rtl"> <h2>Set Value</h2> <?php echo $maskedtextbox->render(); ?> </div> <style scoped> .demo-section { width: 250px; margin: 35px auto 50px; padding: 30px; } .demo-section h2 { text-transform: uppercase; font-size: 1.2em; margin-bottom: 10px; } </style> <?php require_once '../include/footer.php';
<script src="../content/js/cultures/kendo.culture.de-DE.min.js"></script> <script src="../content/js/cultures/kendo.culture.fr-FR.min.js"></script> <script src="../content/js/cultures/kendo.culture.bg-BG.min.js"></script> <div id="product-view" class="k-header"> <div class="right"> <label for="culture">Choose culture:</label> <input id="culture" value="en-US" /> </div> <h2>Product promotion</h2> <ul id="fieldlist"> <li> <label for="initial">Initial price:</label> <?php $initial = new \Kendo\UI\MaskedTextBox('initial'); $initial->mask('9,999.99 $'); $initial->value('1234.56'); echo $initial->render(); ?> </li> </ul> </div> <style scoped> #example h2 { padding: 5px 0; font-weight: normal; border-bottom: 1px solid #999; } #product-view {
<?php require_once '../include/header.php'; require_once '../lib/Kendo/Autoload.php'; $maskedtextbox = new \Kendo\UI\MaskedTextBox('PhoneNumber'); $maskedtextbox->mask('(999) 000-0000'); $maskedtextbox->attr('required', 'required'); $maskedtextbox->attr('data-validmask-msg', 'phone number is incomplete'); ?> <div class="demo-section"> <form id="employeeForm" data-role="validator" novalidate="novalidate"> <h3>Employee</h3> <ul> <li> <label for="FirstName">First Name:</label> <input type="text" class="k-textbox" name="FirstName" id="FirstName" required="required" /> </li> <li> <label for="LastName">Last Name:</label> <input type="text" class="k-textbox" name="LastName" id="LastName" required="required" /> </li> <li> <label for="PhoneNumber">Phone Number:</label> <?php echo $maskedtextbox->render(); ?> <span data-for='PhoneNumber' class='k-invalid-msg'></span> </li> <li class="actions"> <button type="button" data-role="button" data-sprite-css-class="k-icon k-i-tick" data-click='save'>Save</button> </li>
<?php require_once '../include/header.php'; require_once '../lib/Kendo/Autoload.php'; $phone_number = new \Kendo\UI\MaskedTextBox('phone_number'); $phone_number->value("555 123 4567")->mask("(999) 000-0000"); $credit_card = new \Kendo\UI\MaskedTextBox('credit_card'); $credit_card->value("1234 1234 1234 1234")->mask("0000 0000 0000 0000"); $ssn = new \Kendo\UI\MaskedTextBox('ssn'); $ssn->value("003-12-3456")->mask("000-00-0000"); $postcode = new \Kendo\UI\MaskedTextBox('postcode'); $postcode->value("W1N 1AC")->mask("L0L 0LL"); ?> <div class="demo-section"> <h2>Mask Input </h2> <ul id="fieldlist"> <li> <label for="phone_number">Phone number:</label> <?php echo $phone_number->render(); ?> </li> <li> <label for="credit_card">Credit Card number:</label> <?php echo $credit_card->render(); ?> </li> <li> <label for="ssn">Social security number:</label>