262
Views
8
Comments
Como colocar placeholder em listBox com Select2
Question

Bom dia senhores,


Alguém sabe como inserir placeholder em uma listBox com Select2?

Segue imagem da listBox que tenho atualmente.

Grato



Preciso de um placeholder "Selecione":

2019-05-22 11-30-09
Marcelo Ferreira

Hi Agno,

If you are using a listBox you can use "data-placeholder" as a extended property and as value use the text you want. This will only show on IE 10+ browsers.

Regards,

Marcelo


2022-06-07 11-25-18
DiogoRomero

Hi Agno,


In the future, in order to get more/faster help you should try to ask your questions in English, not everyone in the community can read/write in English :) 

ComboBox:

All you need to do is add at position 0 the text you need.

ListBox:

 "data-placeholder" as a extended property.


Regards,

Diogo Romero

2021-06-09 13-39-18
Agno Silveira
 
MVP

Hello again,

I tried as mentioned, but no success. 

I tested in chrome and IE.


What could be wrong?
thank you.

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

This solution is for when you use this https://www.outsystems.com/forge/component/982/select2/. If you are using the one from webPatterns i dont know how to do it.

Regards,

Marcelo

2021-06-09 13-39-18
Agno Silveira
 
MVP

Thank you Marcelo,

I using select2 from webPatterns.

2024-06-19 14-05-15
Emilia Carvalho

Hi there guys,

Agno, did you managed/found a solution to your problem?

Regards.




2021-06-09 13-39-18
Agno Silveira
 
MVP

Hi Divaldo,

No, i not found a solution.

2026-03-27 17-53-40
Celso Duarte Gonçalves

You cannot add a placeholder to a ListBox using web Patterns Select2.

You can use this component from forge to solve your problem:

https://www.outsystems.com/forge/component-overview/982/select2

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.