Hi,
I’m trying to understand something inside the doc but I can’t quite get the hang of it…
To be clear I’m actually playing with Client Script
, on a custom doctype
from a custom Module
. Nothing written in app/folder, it is all “virtual”.
This may be the very first problem…
If what I said above is no problem, when you look at the code proposed from the doc, there is this first line:
frappe.ui.form.ControlData = frappe.ui.form.ControlData.$extend({...
What is this $extend
? When I try to make simple script like this one:
frappe.ui.form.ControlInt = frappe.ui.form.ControlInt.$extend({
make_input: function () {
console.log('make_input');
}
})
I get this Error message: TypeError: frappe.ui.form.ControlInt.$extend is not a function
My goal is to play with some Standard Control, to add some “magic”.
For example: if you add some options to a ControlInt
, I’d like it to become a slide range, by simply changing/adding the type
, the step
, the min
and the max
of the <input>
.
So if anybody can point me in the right direction, it would be much appreciated!
Thanks