<-- link -->
<link rel="stylesheet" href="/bootstrap.min.css">
<-- form -->
<form>
<div class="form-group">
<label for="CNICNo">CNIC Number</label>
<input type="text" class="form-control" id="CNICNo" placeholder="xxxxx-xxxxxxx-x">
</div>
<div class="form-group">
<label for="NTNNo">NTN Number</label>
<input type="text" class="form-control" id="NTNNo" placeholder="xxxxxxx-x">
</div>
<div class="form-group">
<label for="GSTNo">GST Number</label>
<input type="text" class="form-control" id="GSTNo" placeholder="xx-xxxxxxx-x">
</div>
<div class="form-group">
<label for="Phone">Phone or Landline Number</label>
<input type="text" class="form-control" id="Phone" placeholder="(+92) xx-xxxxxxx">
</div>
<div class="form-group">
<label for="Mobile">Mobile Number with Country Code</label>
<input type="text" class="form-control" id="Mobile" placeholder="(+92) 3xx-xxxxxxx">
</div>
<div class="form-group">
<label for="Mobile2">Simple Mobile Number</label>
<input type="text" class="form-control" id="Mobile2" placeholder="03xx-xxxxxxx">
</div>
<br>
<hr>
<button type="button" class="btn btn-primary mt-2 mb-4 float-right"
onclick="showThankYou()">Submit</button>
</form>
<-- script src -->
<script src="/jquery.slim.min.js"></script>
<script src="/bootstrap.bundle.min.js"></script>
<script src="/jquery.inputmask.min.js"></script>
<-- script -->
<script type="text/javascript">
$(document).ready(function () {
// Apply Inputmasks here...
$('#CNICNo').attr('data-inputmask', "'mask': '99999-9999999-9'").inputmask();
$('#NTNNo').attr('data-inputmask', "'mask': '*******-*' , 'definitions': {'*': {'validator': '[A-Za-z0-9]'}}").inputmask();
$('#GSTNo').attr('data-inputmask', "'mask': '99-9999999-9'").inputmask();
$('#Phone').inputmask("(+\\9\\2) 99-9999999", {
"placeholder": "_",
"definitions": {
'x': {
validator: "[0-9]",
cardinality: 1
}
}
});
$('#Mobile').inputmask("(+\\9\\2) 399-9999999", {
"placeholder": "_",
"definitions": {
'x': {
validator: "[0-9]",
cardinality: 1
}
}
});
$('#Mobile2').attr('data-inputmask', "'mask': '0399-9999999'").inputmask();
});
// Show thank you message on form submission
function showThankYou() {
$('form').prepend(`<div class="alert alert-success">Thank you for submitting the form!</div>`);
setTimeout(function () {
$('.alert').remove();
}, 5000);
}
</script>