javascript - Jquery feedback plugin not working -
i planned implement feedback
feature in webapp. google , find jquery plugin
.as per documentation included library in html file , written following code.
$(document).ready(function () { //set minimal options feedback_me plugin fm_options = { bootstrap: false, name_placeholder: "email please", name_required: true, message_placeholder: "go ahead, type feedback here...", feedback_url: "", custom_params: { csrf: "", user_id: "mygmailusername@gmail.com", feedback_type: "clean" } }; //init feedback_me plugin fm.init(fm_options); });
plugin coming pretty this.
but problem after enter email , message
if user click on send
not getting mail.
may miss parameter values, think didn't mention csrf
attribute value may because of that.i didn't understand attribute didn't mention.
for webapp,their no server it's static page.
can me.
have included server handler feebback see feedback_url: ""
user data go server?
so use server script or url feedback.php etc , send email through it.
create url handler sendfeedback.php call
feedback_url: "sendfeedback.php"
sendfeedback may something
<?php $to = --get ajax; $subject = --get ajax'; $message = --get ajax; $headers = 'from: webmaster@example.com' . "\r\n" . 'reply-to: webmaster@example.com' . "\r\n" . 'x-mailer: php/' . phpversion(); mail($to, $subject, $message, $headers); ?>
Comments
Post a Comment