Pergunta

I have a select statement an im trying to get the drop down select menu to display a prompt line like Please Select instead of just a default selection.

<g:select name="country" from="${countrylist}" />

Is there a way to do this with the value attribute or something like that?

Foi útil?

Solução

Use the noSelection attribute of the g:select tag. Documentation.

<g:select name="country" from="${countrylist}" noSelection="['':'Please select a country']" />
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top