I'm simply echoing a user's info in an HTML form as "value=". Everything is working perfectly except the phone number. Here is my current code:
<div class="sign-in-btn">
<input type="phoneNumber" data-mask="(000) 000-0000" name='User_phonenumber' id='User_phonenumber' value=<?php echo $phone;?> />
</div>
Only the area code appears - ie (908). The phone number is formatted in the db as (xxx) xxx-xxxx.
I feel it has something to do with the form because it echos perfectly when done outside the form. For example, the full number (with formatting) echos perfectly in this :
<h3 class="sign-in-header">Your phone number is <?php echo $phone;?> </h3>
Steps I've taken:
- removed "type" in the form attributes - no success
- removed "data-type" in the form - no success
- echoed $phone in other form fields (first name, etc) - same issue.
Any ideas guys and gals?!
Thanks!!