Arcoloc autocompletion

This commit is contained in:
Théophile Bastian 2020-11-01 22:53:35 +01:00
parent ca73ef8b11
commit 80134962bc
2 changed files with 9 additions and 0 deletions

View file

@ -6,6 +6,7 @@
"contentType": "firstname",
"label": "Prénom",
"autocomplete": "given-name",
"value": "",
"placeholder": "Camille"
},
{
@ -14,6 +15,7 @@
"contentType": "lastname",
"label": "Nom",
"autocomplete": "family-name",
"value": "",
"placeholder": "Dupont"
},
{
@ -24,6 +26,7 @@
"autocomplete": "birthday",
"pattern": "^([0][1-9]|[1-2][0-9]|30|31)\/([0][1-9]|10|11|12)\/(19[0-9][0-9]|20[0-1][0-9]|2020)",
"maxlength": 10,
"value": "",
"placeholder": "01/01/1970"
}
],
@ -34,6 +37,7 @@
"contentType": "cityofbirth",
"label": "Lieu de naissance",
"autocomplete": "off",
"value": "",
"placeholder": "Paris"
},
{
@ -42,6 +46,7 @@
"contentType": "address",
"label": "Adresse",
"autocomplete": "adress-line1",
"value": "41 rue Pierre Curie",
"placeholder": "999 avenue de France"
},
{
@ -50,6 +55,7 @@
"contentType": "city",
"label": "Ville",
"autocomplete": "address-level2",
"value": "Arcueil",
"placeholder": "Paris"
},
{
@ -58,6 +64,7 @@
"contentType": "zipcode",
"label": "Code Postal",
"autocomplete": "postal-code",
"value": "94110",
"placeholder": "75001",
"inputmode": "numeric",
"pattern": "[0-9]{5}",

View file

@ -31,6 +31,7 @@ const createFormGroup = ({
pattern,
placeholder = '',
type = 'text',
value = '',
}) => {
const formGroup = createElement('div', { className: 'form-group' })
const labelAttrs = {
@ -56,6 +57,7 @@ const createFormGroup = ({
placeholder,
required: true,
type,
value,
}
const input = createElement('input', inputAttrs)