javascript - Altering Feedback.js to send info & picture to an email address -
i stumbled upon cool js renders screenshot highlighted area feedback on website. website program can found here: http://experiments.hertzen.com/jsfeedback/
however, i'd send email (to address of choosing) once data collected instead of whatever doing now. i've been looking through , i'm assuming done in feedback.js file under
send: function( adapter ) {
however, i'm not entirely sure how change there keep screenshot , data.
when initialize feedback()
, can set options. in case url option important. url should point php script uses $_post[]
data send feedback.js. after got data can send in email php.
here example how set options:
feedback({ label: 'what problem', header: 'report issue', nextlabel: 'next', reviewlabel: 'review screenshot', sendlabel: 'send email', closelabel: 'cancel', messagesuccess: 'done!', messageerror: 'oops..', url: 'path/to/email/sendfeedback.php' // need });
in sendfeedback.php file should te following
if($_post) { $image = $_post['data']; $otherfield = $_post['your-other-field']; // send email here }
$_post['data']
hold image domstring. other input field values in other parameters depending on other fields define.
in php there many ways send emails.
mail()
1 of them. info can found @ php.net..
Comments
Post a Comment