0

how to creat form like facebook which accept both number and email

5th Aug 2018, 1:10 PM
anjit pariyar
anjit pariyar - avatar
7 Antworten
+ 1
OK that sounds complex, but I think FB form *probably* uses JS to see if there is a '@' in the input, which confirms input is e-mail, otherwise if it sees input is only numbers then it is assumed as phone number. Sorry I can't help you with this, too advanced for me, good luck : ) * I will remove my posts from here *
6th Aug 2018, 7:37 AM
Ipang
+ 1
The difference of number, text or e-mail input lies on the "type" attribute of input tag, in the following you can find different input types to use: https://www.w3schools.com/tags/att_input_type.asp Hth, cmiiw
6th Aug 2018, 6:09 AM
Ipang
+ 1
okey listen...just as the form of fb that you get in log in..in which first you get a empty box (whic accept both email as well as your phone number ) in which for text it required @email.com but as well as accept phone numbers
6th Aug 2018, 7:31 AM
anjit pariyar
anjit pariyar - avatar
+ 1
hey. it's ok...yeah i know fb secretly used it...but your answer kinda help me little .and thanks for giving some of your time..i probably appreciate it .thanks again
6th Aug 2018, 7:44 AM
anjit pariyar
anjit pariyar - avatar
+ 1
OK I hope someone can come here with better solution, good luck then : )
6th Aug 2018, 7:47 AM
Ipang
0
you didn't get it
6th Aug 2018, 7:26 AM
anjit pariyar
anjit pariyar - avatar
0
I misunderstood your question : ) try to explain me what you want ...
6th Aug 2018, 7:28 AM
Ipang