Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #103094
    edwardsmarkff
    Participant

    hello – i am trying to “limit” the total number of characters to just three, but i cannot find a good option to do this.   i was able to get this working, but i am going to assume there is a MUCH better way!

    https://codepen.io/edwardsmarkf/pen/mdpogEL

    also, what is the difference between a combo-box and a multi-combo-input?

    https://www.htmlelements.com/demos/input/multi-combo-input/

    #103096
    admin
    Keymaster

    Hi,

    1. There is currently no property of the combobox which allows you to limit the number of characters.
    2. For the difference between ComboBox & MultiComboInput. ComboBox allows you to display large data sets, has UI virtualization, multiple different selection modes, multiple different dropdown options like resize, multiple auto-complete options, etc. The MultiComboInput’s purpose is to display small collection of items in a dropdown and to display them as tags.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103099
    edwardsmarkff
    Participant

    ok thanks – is this the best way to limit the number of characters in a combo-box?

    https://codepen.io/edwardsmarkf/pen/mdpogEL

    window.onload = () => {
    . . for ( let results in document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’) )
    . . {
    . . . . let tmp = document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’)[results] ;
    . . . . if ( (typeof tmp == ‘object’) && tmp.getAttribute(‘class’) == ‘smart-input’)
    . . . . {
    . . . . . . . . tmp.setAttribute(‘maxlength’, ‘3’);
    . . . . . . . . break;
    . . . . }
    . .  }
    }

     

     

    #103102
    admin
    Keymaster

    Hi,

    Only as a temporary workaround such code could be used.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #103110
    edwardsmarkff
    Participant

    >>> “Only as a temporary workaround such code could be used.”

    does this mean the option may become available?

    • This reply was modified 1 year, 12 months ago by edwardsmarkff.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.