0.0.19 • Published 6 years ago
jotform_chatbot v0.0.19
Jotform Chatbot
By importing one react component JotChat, you can use it as chatbot in your projects.
This is proof of concept. If you want to use this, you need proxy server.
Install
npm install jotform_chatbot
or
yarn add jotform_chatbot
Usage
- Include jotform javascript api into your main html page.
<script src="https://js.jotform.com/JotForm.js"></script>- Include following bootstrap and scripts into your main html page between
<head>tags.
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" type="text/css"
rel="stylesheet"
>- You should import
node_modules/jot_chat_2/lib/cjs/index.cssfrom your node modules. It is my css file.
Example usage
import React from 'react';
import JotChat from 'jotform_chatbot';
import '../node_modules/jot_chat_2/lib/cjs/index.css'
function App() {
const initialState = {
formId: 'Your_jotform_form_id',
apiKey: 'your_jotform_apiKey'
};
return (
<div className="App">
<JotChat initialState={initialState}/>
</div>
);
}
export default App;Live Demo
Properties
You should use following properties to use this jotform_chatbot properly.
| Properties | Type | Required | Default value | Description |
|---|---|---|---|---|
| formId | string | yes | not | Related form Id from your jotform forms |
| apiKey | string | yes | not | Special key defined in your jotform profile |
Specificially used jotform question types
I have been using 7 different question types in my jotform_chatbot project.
| Question Types |
|---|
| control_name |
| control_email |
| control_dropdown |
| control_textarea |
| control_datetime (dd-mm-yyyy) |
| control_radio |
| control_checkbox |
Other question types will be added. They are in the progress.
Contributing
Feel free to send pull request.
Licence
MIT semihOzden
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago