Activity Forums Salesforce® Discussions How to select multiple values from datalist?

  • How to select multiple values from datalist?

    Posted by jitesh on April 26, 2016 at 8:08 am

    I have a scenario where I have to select multiple values from a html datalist which should be separated by comma ",".

    For example :- if I select "new york" from the datalist I should be able to select another state from the datalist like "New York , New Jersy". Currently what happens is that when I select "New York" from the datalist dropdown then the dropdown shows me only the results whose text is similar to "New York" and allows me to select only one.

    So I want that when I select "New York" then after selecting this value I should be able to select "New Jersy" also .

    jitesh replied 8 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • shalini

    Member
    April 26, 2016 at 10:19 am

    Hi Jitesh,
    Try an attribute multiple = multiple in the input element in the datalist.

    Thanks

  • jitesh

    Member
    April 26, 2016 at 11:26 am

    Thanks Shalini for your response but that did not work . I think "multiple" works only for the input type="email" but I have input type="text" . It would be great if you could suggest anything else.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos