By Vijay Simha A on October 6, 2024
Intermediate

Creating 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');






More articles on ERP Development



More articles on ERP Development
Comments

No comments yet.

Add a comment
Ctrl+Enter to add comment