I have a devextreme form with some fields and a submit button on it. If I hit the submit button, the corresponding click event in the component isn't firing. The useSubmitBehavior
is set to true and the submit
event is set to the component click event. Here is a simple example: example
Asked
Active
Viewed 1,772 times
1

derstauner
- 1,478
- 2
- 23
- 44
1 Answers
1
You've to put your <dx-form>
tag inside <form>
and move (submit)="formSubmit()"
to<form>
tag
<form (submit)="formSubmit()">
<dx-form>
<dxi-item dataField="name">
<dxi-validation-rule type="async" message="name already exists"
[validationCallback]="alreadyExists">
</dxi-validation-rule>
</dxi-item>
<dxi-item>
<dx-button text="submit" [useSubmitBehavior]="true"></dx-button>
<dx-button text="close" (click)="closeButtonClick()"></dx-button>
</dxi-item>
</dx-form>
</form>

wessam yaacob
- 909
- 1
- 6
- 14
-
Yes, this is it. I thought, the dxForm implements the stadard form functionality and that I don't need to wrap it in a form tag. – derstauner Jun 21 '20 at 12:56