Home › Forums › Quform WordPress › Masked Phone number field does not save to entries nor db
- This topic has 4 replies, 2 voices, and was last updated 9 years, 11 months ago by jerkski.
- AuthorPosts
- May 21, 2014 at 3:39 pm #10996jerkskiParticipant
Hello,
I am having a bit of trouble with saving a masked phone number field to the database. My database field type is varchar(12). My path to jquery.maskedinput.min.js is valid.
I followed your guide to do this, but it does not save to either my quform entries or custom mysql database table. If I remove the script code, it does work, but obviously saves unmasked. Any tips? Here is the HTML code i put in the form:
<script type=”text/javascript” src=”http://localhost/wp-content/jquery.maskedinput.min.js”></script>
<script type=”text/javascript”>jQuery(document).ready(function ($) {
$(“.iphorm_6_27”).mask(“999-999-9999”);
});</script>And here is the regex:
/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/
May 21, 2014 at 3:44 pm #10998jerkskiParticipantUgh…sorry, accidentally put Regex under filters instead of validators. Works great now!
May 21, 2014 at 3:45 pm #10999AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 21, 2014 at 3:45 pm #11000AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 21, 2014 at 9:16 pm #11002jerkskiParticipantThnx for the response. I appreciate your hard work and timeliness!!
- AuthorPosts
- You must be logged in to reply to this topic.