Placeholder in dataCombo

ZEN, Caché

How to define placeholder for dataCombo?

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

  • + 1
  • 0
  • 163
  • 0
  • 1

Answers

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ê