Question: Input box to enter a phone number or a code Submit button Radio buttons to indicate what to enter US Phone number (xxx) xxx-xxxx FR

Input box to enter a phone number or a code

Submit button

Radio buttons to indicate what to enter

US Phone number (xxx) xxx-xxxx

FR Phone number xx.xx.xx.xx

US SS number xxx-xx-xxxx

Verify it is correct on Submit

Extra credit:

Use keyboard events to format the input as the number is typed

Allow user to hit to submit

 Input box to enter a phone number or a code Submit

I can`t get the input to switch to display what radio button was clicked

essentially it should be able to receive input from the radio button and display which was clicked plus the input form

It should have a required pattern for the input and return a new format when you click the button. It should have a placeholder for example us (XXX)-XXX-XXX

There should also be a limit on the characters you can enter for each option and add in dashes or dots as the user inputs the numbers.

so far I have this :

Forms: Get information

Enter your information?

function formatNums(){

if(document.getElementById('us').checked) {

document.getElementById('format').innerHTML = "US tel:" + " "+document.getElementById('forms').value

} else if (document.getElementById('fr').checked) {

document.getElementById('format').innerHTML = "FR tel:" + " "+document.getElementById('forms').value

} else if (document.getElementById('ssn').checked) {

document.getElementById('format').innerHTML = "US SS:" + " "+document.getElementById('forms').value

} else {

document

}

}

Enter your information? US Phone Number French phone number Social Security Number US Phone Number US tel: (123) 456-6789 Enter your information? US Phone Number French phone number Social Security Number French Phone Number FR tel: 12.34.56.78 Enter your information? US Phone Number French phone number Social Security Number US Social Security Number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!