Hi, I have a custom textbox inside lightbox(in scheduler) and want to set placeholder text for this. How can I achieve this?
Hello @rajeswarij ,
Just as a clarification, you mean that you created some custom textbox
control, as described by the following link:
https://docs.dhtmlx.com/scheduler/custom_lightbox_editor.html
? If so, I can’t give any suggestions, as possibility to add a placeholder will be connected with the functionality of this custom control, so you should check its own documentation(but likely it will be possible).
If you just added another textarea
control:
https://docs.dhtmlx.com/scheduler/textarea.html
It uses displays the connected field of the event, so you can just add some default content to the associated field of the event, so it will be used as a placeholder, something like follows:
scheduler.attachEvent("onBeforeLightbox", function (id){
let ev = scheduler.getEvent(id);
if(!ev.text_2){
ev.text_2 = "Placeholder text"
}
return true;
});
Demo:
https://snippet.dhtmlx.com/sr9bs2y6
btw, the dev team will add the API that allows to define placeholder to the textarea in the future scheduler update.
Best regards,
Hi,
if(!ev.text_2){
ev.text_2 = "Placeholder text"
}
This is not exactly a placeholder. this is some default text you are adding. However, I was able to add placeholder through some css changes.
Adding support for placeholder in future release would be highly appreciated. Thanks.