2
私は角型アプリ内でformspreeを使用しています。私は電子メールの件名を変更することができないことを除いて、すべてが機能しています。ajaxでformspreeの件名を変更する
のHTML ...
<form id="bookingForm" action="https://formspree.io/[email protected]"
method="POST">
<input type="text" name="{{client.name}}">
<input type="{{client.email}}" name="_replyto">
<input type="hidden" name="_subject" value="Request from {{client.name}}">
<!-- some other info -->
<input type="submit" value="Send">
</form>
JS ...
$bookingForm = $('#bookingForm');
$bookingForm.submit(function(e) {
e.preventDefault();
$.ajax({
url: '//formspree.io/[email protected]',
method: 'POST',
data: {
client: $scope.client.name,
email: $scope.client.email,
phone: $scope.client.phone,
// some other info
},
dataType: 'json',
});
});
_replytoが動作しているようだが、_subjectではありません。