feedbackSD - javascript plugin for simple feedback form for any sites
Basic Usage without NPM
- аdd sript tag to head section of html
Строительный двор
- init in end of body section
## params for init function
Param | Type | Description | Required | Defalt value |
---|---|---|---|---|
id | string | id of an element for appending form | True | |
endpoin | string | url for sending json with form data | True | |
btnTitle | string | text for feeddback btn | False | 'Feedback' |
Basic Usage with NPM (React example)
npm install feedback-sd
;; Component { superprops; feedbackSD thisstate = name: '' email: '' text: ''; thishandleChangeName = thishandleChangeName; thishandleChangeEmail = thishandleChangeEmail; thishandleChangeText = thishandleChangeText; thishandleSubmit = thishandleSubmit; } { feedbackSD event; } { this; } { this; } { this; } { return <form onSubmit=thishandleSubmit> <input type="text" value=thisstatename onChange=thishandleChangeName /> <input type="text" value=thisstateemail onChange=thishandleChangeEmail /> <input type="text" value=thisstatetext onChange=thishandleChangeText /> <button onClick=thishandleSubmit>Отправить форму</button> </form> ; } ;
Development mode
git clone https://github.com/dima-bu/feedbackSD.gitcd /feedbackSDnpm inpm run live
Open in browser http://localhost:9000