I am using the phone form helper recommended by Bootstrap to validate phone numbers inside of a text box. The validation works as expected, but I am having some trouble setting the default value of the text box. This is the mark-up I use:
<input type = "text" class = "bfh-phone" data-format = "(ddd) ddd-dddd"
id = "phone" value = <?php echo $phone; ?>>
My PHP $phone variable is a 10 digit non-formatted number
$phone = 1234567890;
Unfortunately, the above does not display as a default value for my input box. If I take off the 'class' and 'data-format' attributes from the input element then the default value displays as expected.
I've tried formatting my $phone variable along the lines of the data-format attribute.
IE:
$phone = (123) 456-7890;
But no dice. How do I set a default value using a PHP variable in this case?