I Created a dialog box and added field customer_type1 it is a html field and also created a tax field it is a link field . when the user select Service then make the tax field is manditory. IS this possible .Below is my short code .
frappe.prompt([
{‘label’: ‘Customer Name’, ‘fieldname’: ‘customer_name’, ‘fieldtype’: ‘Data’, ‘reqd’: true},
{
‘label’: ‘Customer Type1’,
‘fieldname’: ‘customer_type1’,
‘fieldtype’: ‘HTML’,
‘options’: <div style="display: flex;"> <label style="margin-right: 20px !important;"> <input type="radio" name="customer_type1" value="Company" checked> Company </label> <label> <input type="radio" name="customer_type1" value="Individual"> Individual </label> <label> <input type="radio" name="customer_type1" value="Service"> Service </label> </div>
},
{'label': 'Tax Category', 'fieldname': 'tax', 'fieldtype': 'Link','options':'Tax Category','mandatory_depends_on':''},
{'label': 'Company', 'fieldname': 'company', 'fieldtype': 'Link', 'options': 'Company', 'default': frm.doc.company,'hidden': true},
])