Seeing the form was for feedback purposes and not a lot was need I implemented a simple form of my own.
jQuery:
<form method='post' id='feedback-form'>\
<textarea name="feedback-message" id='feedback-message' rows="10" cols="10" required />\
<input type="submit" name="feedback-submit" id='feedback-submit' class="ninja-forms-field btn btn-primary custom-button red-btn" value="Thanks!" \
placeholder="Type your comments/suggestions/functionality requests" />\
</form>\
PHP
add_action( 'init', 'feedback_form_submit' );
function feedback_form_submit() {
if(isset($_POST['feedback-submit'])) {
//here you'll have your form data in a $_POST array, you can check it using a print_r. parse the form and insert the post
$message = $_POST['feedback-message'];
$user = wp_get_current_user();
$from_first_name = $user->user_firstname;
$from_last_name = $user->user_lastname;
$from_email = $user->user_email;
$headers="From: "" . $from_first_name . ' ' . $from_last_name . '" <' . $from_email . '>';
// mail message to admin
$to = '[email protected]';
$subject="[SRC Thor] New feedback";
mail( $to, $subject, $message, $headers);
wp_redirect(home_url('/index.php/nl/thank-you'));
exit;
}
}