How to perform conditional if

How to perform condition if satment in frappe. For examle i want load car model according to selected car brands in select box?

Within doctype, you can write your if condition in Depends on Field. Or you can write on js file of the that doctype.

frappe.ui.form.on('doctype_name', {
	onload: function(frm) {
		frm.set_query("field_name", function() {
			return {
				"filters": {
					"disabled": 0,
					"model": "xyz"
				}
			};
		});
}

}