Hello Team,
Need Guidance :
We want to make an UI(user interface) customization for a doctype.
We would like to have a below mentioned UI for a doctype.
We had created a HTML field in the doctype with below mentioned html in it.
<div id="myGridBusinessmodel" style="width: 100%; height:500px;" ></div>
To achieve above UI we are using third party js library as mentioned below.
Below is the implementation we did.
frappe.ui.form.on("ExcelLook", "onload", function (frm) {
console.log("ExcelLook On Load Called")
var container = $('#myGridBusinessModel');
console.log("container is "+JSON.stringify(container))
})
Console Output
{"length":0,"prevObject":{"0":{},"selector":"","length":1},"selector":"#myGridBusinessModel"}
As we can see in above console output we are not getting the HTML Div Element object. Instead we are getting some other JS Object.
We need to access the HTML Element object in blue as seen in below Image.
Once we get access to the HTML Element then it’s very easy to create a UI.
Can you guys please guide us how we can get access to HTML element?