PHP Help - Phone Number Format and Require Selection

I have a basic php form for my website that I found online. I was able to get it configured mostly, but there are a few things I need help with.

  1. Website visitors always submitted their phone number in various formats (ie. (xxx)xxx-xxxx, xxx-xxx-xxxx, xxxxxxxxxx). I want it to automatically make the form change the info to (xxx)xxx-xxxx, not matter how they type it in. How do I do that? I am fine with either having the actual form in HTML default data entry into that format OR having the sendresults.php change the format so it is correct when it arrives in my email.

  2. I have my php require all fields be completed. However, I also have a radio button as part of my form, and it is NOT requiring selection of that. I need both the text boxes AND the radio button option selected before a vistor can submit the form.

Please help!

Sponsor our Newsletter | Privacy Policy | Terms of Service