how to make a field mandatory on custom widget portal

Srividya Kiran
Tera Contributor

In the sc_cart page, we have used a custom widget.  In that we have made all the fields as mandatory (red asterisk) in this page and the functionality was working fine earlier. But this is not working after upgrade to Washington DC.
We were able to submit ticket without providing details, so the validation is not working. 

Below are the fields in sc_cart page

SrividyaKiran_0-1722319630595.png

 

Previously in the HTML template we have used the below code 
<span style="color:red;font-size:20px"ng-show="checkoutDetails.deliverToName.$untouched||(checkoutDetails.deliverToName.$touched &&checkoutDetails.deliverToName.$error.required)">*</span>
<label for="delivery_contact_name">Delivery Contact Name </label>
<input type="text" class="form-control" id="deliverToName" name="deliverToName" ng-model="c.delivery.contactName" required > 
this code worked Previously. now even if use the below also it is not working
<span style="color:red;font-size:20px"ng-show="checkoutDetails.deliverToName.$untouched||(checkoutDetails.deliverToName.$touched &&checkoutDetails.deliverToName.$error.required)">*</span>
<label for="delivery_contact_name">Delivery Contact Name </label>
<input type="text" class="form-control" id="deliverToName" name="deliverToName" ng-model="c.delivery.contactName" ng-required= "true" > 

 


Could you please help me to make the field mandatory.


Thanks in advance.

 

0 REPLIES 0