View Source

URL Prefill

Автозаполнение полей формы из URL-параметров. Whitelist обязателен для безопасности.

Minimum 1 character

Попробуйте

?name=Иван&email=ivan@test.com?name=John&email=john@example.com&phone=+1234567890

Код

const prefilled = useUrlPrefill({ fields: ['name', 'email', 'phone'], cleanUrl: true, }) <Form initialValue={{ ...defaults, ...prefilled }} ...>