Вопрос

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?

Это было полезно?

Решение

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

<g:select name="country" from="${countrylist}" noSelection="['':'Please select a country']" />
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top