"vc.resetValidation는 함수가 아닙니다." 양식이 효과적으로 제출됩니다 - 업데이트가 잘 이루어졌습니다. 어떻게이 오류를 해결할 수 있습니까? 여기 자동 폼 업데이트 : 나는 사용자의 스키마에 대한 양식을 업데이트 할 때 오류 <code>vc.resetValidation is not a function</code>를 얻을 내가</p> <pre><code>aldeed:collection2-core aldeed:autoform aldeed:schema-deny npm simpl-schema </code></pre> <p>에있어
은 여기 내 쿼리{{#autoForm collection='Meteor.users' doc=currentUser type='update' id='accountForm'}}
{{> afFieldInput name='profile.phone'}}
{{> afFieldInput name='profile.avatar'}}
<button type='submit' class="at-btn dark">Update</button>
{{/autoForm}}
이다 나는 당신이 onSuccess
후크에서 사실 onSubmit
나에 resetForm
를 호출 할 수 있습니다
/// Reset array counts
arrayTracker.resetForm(formId); var vc = AutoForm.getValidationContext(formId);
if (vc) {
vc.resetValidation();
// If simpleSchema is undefined, we haven't yet rendered the form, and therefore
// there is no need to reset validation for it. No error need be thrown.
}
if (this.doc) {
event.preventDefault();
AutoForm._forceResetFormValues(formId);
}
, 왜 그냥 대신'''onDestroyed''' 방법 내에서 양식을 재설정? – blueren
@blueren 당신의 충고를 시도했습니다 .'Template.myTemplate.onDestroyed (function() { AutoForm.resetForm ("form-id"); }), 변경하지 않았 으면 오류가 계속 발생합니다. 그 뜻 이니? – Ontokrat
양식을 제출 한 후 현재 서식에서 벗어나려고합니까? 내 말은,'''Template.myTemplate.onDestroyed'''가 포스트 폼 제출이라고 부름입니까? – blueren