diff options
author | itchief <alex.malcev1980@gmail.com> | 2022-03-21 13:42:54 +0300 |
---|---|---|
committer | itchief <alex.malcev1980@gmail.com> | 2022-03-21 13:42:54 +0300 |
commit | 4830729817e4d90736d989a6cddcfc8afd1e679e (patch) | |
tree | 10e26b8e9457b518dc67cc8c283889522c9a8117 | |
parent | 2cd9b85e03e5341e3881fdec405e56e880966068 (diff) |
Update
-rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -4,8 +4,11 @@ A small project containing an example of a page with a feedback/contact form bui Check the on here Demo: https://itchief.ru/examples/lab.php?topic=php&file=feedback-form Screenshots: + ![](https://itchief.ru/assets/images/350/1.png) + ![](https://itchief.ru/assets/images/350/2.png) + ![](https://itchief.ru/assets/images/350/3.png) ## Step-by-step instructions @@ -45,3 +48,19 @@ document.querySelector('.form-success__btn').addEventListener('click', (e) => { e.target.closest('.form-container').querySelector('.form-success').classList.add('form-success_hide'); }); ``` +The `reset()` method resets the form. + +3. Initialize the form as `ItcSubmitForm`: +```js +// 'form' - selector +const form = new ItcSubmitForm('form'); +``` +Additional parameters are passed in the 2nd argument: +```js +const form = new ItcSubmitForm('form', { + isCheckValidationOnClient: true, // проверять форму перед отправкой на сервер + attachMaxItems: 5, // максимальное количество файлов, которые можно добавить к форме + attachMaxFileSize: 512, // 512 Кбайт - максимальный размер файла + attachExt: ['jpg', 'jpeg', 'bmp', 'gif', 'png'] // допустимые расширения файлов +}); +``` |