Submit function make unclicakable until field value not selected in widget

Bhavani3
Tera Contributor

I need to make submit as unclickable until field value not selected in a custom widget portal

In HTMl I have choice field if i select choice field then submit button clickable if not selected the choice field submit button needs to make as unclickable 

here below the code what functionality need to add to make unclickable

HTML Code

<div class="submit-btn">
<input class="btn btn-primary btn-block" ng-click="c.submit($c.data.tp)" type="submit" value="submit">
</div>

 

Client script

$scope.c.submit=function(curr_item) {
c.server.update().then(function() {
url="?id=sc_cat_item&sys_id=" + c.data.tp
var win = window.open(url, '_self');
win.focus();

});}

 

 

0 REPLIES 0