0

I made this form:

<form>

        Name:<br>
        <input type="text" name="name">

        Last mame:<br>
        <input type="text" name="lastname">

        Email:<br>
        <input type="text" name="email">

        Phone number:<br>
        <input type="text" name="phone">
</form>

but I need only 9 numbers in Phone number.

How can i do this?

Then I need a form to chose a color something like this:

enter image description here

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
  • Possible duplicate of [Limit number of characters allowed in form input text field](http://stackoverflow.com/questions/8545376/limit-number-of-characters-allowed-in-form-input-text-field) – Teja Nandamuri Feb 02 '16 at 20:04
  • Please split up your question in two separate questions, so it is easier to find someone who has a solution for them. – Reflic Feb 02 '16 at 20:06

1 Answers1

2
  1. You can make a maximum length in a form with the maxlength attribute.

You can see this attribute in the example:

<form>
  Phone number:<br>
  <input type="text" name="phone"  maxlength="9" >
</form>

2.You can make a form to chose the color with input type: color

<form>
  Color:
  <input type="color" name="color">
</form>
Borja 724
  • 46
  • 3