Open aashishab opened 8 years ago
Hi,
I want to make my form Submit button enable once you add the comment in the form field. But it is not working.. Here is my code snippet:
template:
< div class="col-sm-1 m-t-xs text-left"> < a (click)="showComment()" id="Comments" data-type="textarea" data-pk="1" data-url="" data-title="Enter comments">< i (click)="showComment()" class="text-primary text-left" title="Click to enter comments">< /i>< /a> < /div> < button type="submit" id="saveData" [ngClass]="editForm.valid && editForm.dirty ? 'btn-primary' : 'btn-default'" [disabled]="!(editForm.valid && editForm.dirty)">Save changes< /button>
Component class:
$('#Comments').editable({ 'rows ': 4, 'inputclass': 'word-wrap newComments', success: function(response, newValue) { if (newValue) { if(this.editForm.valid) { this.editForm.dirty = true; } }
} });
What is the error you are getting and can you provide a plunker or jsfiddle showing your issue?
It is not giving any error. It is not calling its success method or not invoking it.
See if there is anything in this thread that will help you.
Hi,
I want to make my form Submit button enable once you add the comment in the form field. But it is not working.. Here is my code snippet:
template:
Component class: