Credence Analytics - Frappe Code Snippets
By Vijay Simha A on October 6, 2024
IntermediateCreating a Frappe Form control in a page
let f = frappe.ui.form.make_control({
parent: $(".lead-filter"),
df: {
fieldname: "product",
fieldtype: "MultiSelect",
options: ['CashTrea', 'iDeal'],
placeholder : 'Product',
is_filter: true,
change: () => {
if (f.bounce) {
debugger;
alert(f.get_value());
}
f.bounce = !f.bounce;
},
},
render_input: true,
});
// to catch the on change function when it is fired second time on blur
f.bounce = true
//remove the label div
f.$wrapper.find(".clearfix").remove();
f.$wrapper.parent().css('height', '2.15em');
Was this article helpful?
More articles on ERP Development