Skip to content

Commit

Permalink
fix: jquery insert position
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Aug 14, 2018
1 parent 4e74572 commit f14d9e1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions public/js/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

// Form validation
const form = $('#feedback-form');
const form = $('#feedback-form form');
$('button[type="submit"]').on('click', () =>
form.find('[required]').addClass('required')
);
Expand Down Expand Up @@ -64,12 +64,9 @@
.val()
.slice(0, 100);
const subject = 'Feedback' + product + ' - ' + message;
form.append(
form.prepend(
$('<input type="hidden" name="_replyto">').val($('#form_email').val())
);
if (params.has('ref')) {
form.append($(`<input type="hidden" name="ref">`).val(params.get('ref')));
}
form.append($(`<input type="hidden" name="_subject">`).val(subject));
form.prepend($(`<input type="hidden" name="_subject">`).val(subject));
});
})(jQuery);

0 comments on commit f14d9e1

Please sign in to comment.