Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/itchief/feedbackForm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritchief <alex.malcev1980@gmail.com>2022-03-21 13:42:54 +0300
committeritchief <alex.malcev1980@gmail.com>2022-03-21 13:42:54 +0300
commit4830729817e4d90736d989a6cddcfc8afd1e679e (patch)
tree10e26b8e9457b518dc67cc8c283889522c9a8117
parent2cd9b85e03e5341e3881fdec405e56e880966068 (diff)
Update
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index d3b0c01..ed9f118 100644
--- a/README.md
+++ b/README.md
@@ -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'] // допустимые расширения файлов
+});
+```