How to make a Widget's ID appear on simple (not advanced) designer
By default a Widget's ID can only be set through the advanced designer/view. Is it possible to set in simple designer/view? I am using Thunder to create the designer, in case that matters.
Hi David,
You can expose the default properties which are in the advanced view to be visible in your widget designer simple view. In the designer template you should add a control for the ID, then in the js of the designer you should add the getting and setting of the ID in refreshUI and applyChanges methods.
Designer Template:
<
div
>
<
span
>ID:</
span
><
br
/>
<
input
type
=
"text"
id
=
"controlId"
/>
</
div
>
refreshUI:
function
()
var
controlData =
this
.get_controlData();
jQuery(
"#controlId"
).val(controlData.ID);
,
applyChanges:
function
()
var
controlData =
this
.get_controlData();
controlData.ID = jQuery(
"#controlId"
).val();
,