0
autoform hook이 작동하는 데 문제가 있습니다. 현재이 빠른 양식을 사용 중입니다.Autoform Hooks onSuccess
{{>quickForm id="studentForm" collection="Students" type="insert" template="bootstrap3-horizontal" label-class="col-sm-3" input-col-class="col-sm-9"}}
양식이 성공적으로 제출되면 성공 메시지를 표시하려고합니다. 내가 그렇게 같은 자동 폼 후크 사용하려고 시도하고
Template.home.events({
"submit #student-form": function(event) {
event.preventDefault();
swal("Success!", "You have been added to the WaitList", "success")
}
});
: 현재 내가 이벤트가이 코드로 작업 한
AutoForm.hooks({
studentForm: {
onSuccess: function(insert, result) {
swal("Success!", "You have been added to the wait list", "success")
}
}
})
이 순간에 나를 위해 작동하지 않는 나는 이유에 대해 난처한 상황에 빠진입니다 이 작동하지 않습니다. 자동 형성 후크에 대한 문서 here.
내 아이디어에 대한 아이디어가 있습니까?
야생의 추측이지만 preventDefault()를 주석 처리 했습니까? – zim
그래, 그 트릭을 했어. 감사! –
위대한 내가 대답하게 만들거야. – zim