Question
· May 23, 2017

Placeholder in dataCombo

How to define placeholder for dataCombo?

set dc.placeholder = "Some text"  doesn't work.

Discussion (1)0
Log in or sign up to continue

Hi Ruslan,

I found an alternative,

Suppose your dataCombo id is 'test' ( <dataCombo id="test" ...):

Method %OnDrawHTMLBody() As %Status
{
      &html<<script type="text/javascript">
          document.addEventListener("DOMContentLoaded", function(event) {
          var old document.getElementById('test').innerHTML;
          newHtml old.replace('class="comboboxInput"','class="comboboxInput" placeholder="Your custom placeholder..."');
          document.getElementById('test').innerHTML newHtml;
       });</script>>
      Quit $$$OK
}
 

I hope it helps!

Andrei L. Nenevê