{"id":242,"date":"2011-04-30T16:51:33","date_gmt":"2011-04-30T21:51:33","guid":{"rendered":"http:\/\/xlinesoft.com\/blog\/?p=242"},"modified":"2011-11-02T10:14:40","modified_gmt":"2011-11-02T15:14:40","slug":"masked-input-in-phprunnerasprunnerpro-applications","status":"publish","type":"post","link":"https:\/\/xlinesoft.com\/blog\/2011\/04\/30\/masked-input-in-phprunnerasprunnerpro-applications\/","title":{"rendered":"Masked input in PHPRunner\/ASPRunnerPro applications"},"content":{"rendered":"<p>In this tutorial we are going to use an excellent <a href=\"http:\/\/digitalbush.com\/projects\/masked-input-plugin\/\">jQuery Masked Input<\/a> plugin by Josh Bush.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-243\" title=\"masked_input\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/04\/masked_input.png\" alt=\"\" width=\"540\" height=\"222\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/04\/masked_input.png 540w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/04\/masked_input-300x123.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/04\/masked_input-150x61.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/04\/masked_input-400x164.png 400w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><br \/>\n<!--more--><br \/>\n1. Download plugin and save it to <strong>include<\/strong> folder under output directory. You can download either uncompressed or minimized version of the plugin.<\/p>\n<p>2. Proceed to the page where you want to use the masked edit i.e. to the Add page in Visual Editor. Switch to HTML mode and add the following code snippet right before <strong>{END flybody}<\/strong> tag:<\/p>\n<pre>\r\n<div>\r\n<div>&lt;SCRIPT type=text\/javascript src=\"include\/jquery.maskedinput-1.3.js\"&gt;&lt;\/SCRIPT&gt;<\/div>\r\n<\/div><\/pre>\n<p>If you downloaded minified version of the script change file name accordingly.<\/p>\n<p>3. Add the following code to Javascript OnLoad event of the same page.<\/p>\n<pre lang=\"javascript\">$(\"#value_EPACity_\"+pageid).mask(\"99\");\r\n$(\"#value_Phone_\"+pageid).mask(\"(999) 999-9999\");<\/pre>\n<p><strong>Note:<\/strong> Field names are case sensitive.<\/p>\n<p>See <a href=\"http:\/\/demo.asprunner.net\/volinrok_yahoo_com\/MaskedInput\/Cars_add.php\">live demo<\/a>. Put cursor into EPACity or into Phone# field to see how it works.<\/p>\n<p>A bit more info about mask formats. The following mask definitions are predefined:<\/p>\n<p>a &#8211; Represents an alpha character (A-Z,a-z)<br \/>\n9 &#8211; Represents a numeric character (0-9)<br \/>\n* &#8211; Represents an alphanumeric character (A-Z,a-z,0-9)<\/p>\n<p><strong>A few examples:<\/strong><br \/>\nUS social security number:  $(&#8220;#ssn&#8221;).mask(&#8220;999-99-9999&#8221;);<br \/>\nDate: $(&#8220;#date&#8221;).mask(&#8220;99\/99\/9999&#8221;);<br \/>\nTime (hh:mm:ss): $(&#8220;#date&#8221;).mask(&#8220;99:99:99&#8221;);<br \/>\nPhone number:  $(&#8220;#phone&#8221;).mask(&#8220;(999) 999-9999&#8221;);<br \/>\nPhone number with optional extension:  $(&#8220;#phone&#8221;).mask(&#8220;(999) 999-9999? x99999&#8221;);<\/p>\n<p><a href=\"http:\/\/digitalbush.com\/projects\/masked-input-plugin\/\">More usage examples and documentation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we are going to use an excellent jQuery Masked Input plugin by Josh Bush.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":6,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}