You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,27 @@ FormKiQ Client SDK - JavaScript
3
3
4
4
**Note: This Initial Version comes with CommonJS and ES6 versions**
5
5
6
+
## Installation
7
+
```sh
8
+
npm i formkiq-client-sdk-javascript
9
+
```
10
+
11
+
FormKiQ Client SDK should now be available as part of your *node_modules*.
12
+
6
13
## Instructions for Use (Web/CommonJS)
14
+
Note: while these instructions are for including this SDK in a script tag, you can also use the ES6 version for frameworks such as Angular and React JS: ./node_modules/formkiq-client-sdk-javascript/dist/formkiq-client-sdk-es6.js
@@ -45,7 +54,9 @@ To add processing to any web form using FormKiQ, add the class "fkq-form" to you
45
54
<formclass="fkq-form">
46
55
```
47
56
48
-
No action or onsubmit is required or desired, as FormKiQ Web Form Handler will automatically create the submission action. A submit button is expected, to trigger the onsubmit event that the Web Form Handler uses to submit the form:
57
+
No action or onsubmit is required or desired, as FormKiQ Web Form Handler will automatically create the submission action.
58
+
59
+
A submit button is expected, to trigger the onsubmit event that the Web Form Handler uses to submit the form:
49
60
50
61
```html
51
62
<input
@@ -58,10 +69,10 @@ NOTE: You can use any input type, including **text inputs**, **passwords**, **ch
58
69
59
70
There are two callbacks included in the Web Form Handler:
60
71
-**onFormSubmitted**(formName)
61
-
-**onFormCompleted**(formName, response)
72
+
-**onFormCompleted**(formName, response: {})
62
73
63
-
Validation has not yet been implemented; a simple implementation is next on our roadmap.
74
+
Any input fields that should be required should include a "required" HTML Attribute, and those will prevent the form from submitting. To create custom validation rules, you should submit the form manually using **onsubmit**, and add extra validation in the triggered submit function.
64
75
65
76
## Submitting a Form Manually
66
77
67
-
You can also submit the form manually using **formkiqClient.webFormsHandler.submitFormkiqForm(thisForm);**
78
+
You can submit the form manually using **formkiqClient.webFormsHandler.submitFormkiqForm(thisForm);**
Copy file name to clipboardExpand all lines: build/README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,9 @@ To add processing to any web form using FormKiQ, add the class "fkq-form" to you
54
54
<formclass="fkq-form">
55
55
```
56
56
57
-
No action or onsubmit is required or desired, as FormKiQ Web Form Handler will automatically create the submission action. A submit button is expected, to trigger the onsubmit event that the Web Form Handler uses to submit the form:
57
+
No action or onsubmit is required or desired, as FormKiQ Web Form Handler will automatically create the submission action.
58
+
59
+
A submit button is expected, to trigger the onsubmit event that the Web Form Handler uses to submit the form:
58
60
59
61
```html
60
62
<input
@@ -67,13 +69,13 @@ NOTE: You can use any input type, including **text inputs**, **passwords**, **ch
67
69
68
70
There are two callbacks included in the Web Form Handler:
69
71
-**onFormSubmitted**(formName)
70
-
-**onFormCompleted**(formName, response)
72
+
-**onFormCompleted**(formName, response: {})
71
73
72
-
Validation has not yet been implemented; a simple implementation is next on our roadmap.
74
+
Any input fields that should be required should include a "required" HTML Attribute, and those will prevent the form from submitting. To create custom validation rules, you should submit the form manually using **onsubmit**, and add extra validation in the triggered submit function.
73
75
74
76
## Submitting a Form Manually
75
77
76
-
You can also submit the form manually using **formkiqClient.webFormsHandler.submitFormkiqForm(thisForm);**
78
+
You can submit the form manually using **formkiqClient.webFormsHandler.submitFormkiqForm(thisForm);**
0 commit comments