Question

I've searched around the net but I have not found a solution. Is there something like numeric up down, for numeric selection in Grails? How can I create it?

Was it helpful?

Solution

You can achieve your requirement via simple html as:

 <input type="number" name="quantity">

you can set range also as:

 <input type="number" name="quantity" min="1" max="5"> 

and If you want you can add value attribute to be shown as:

 <input type="number" name="quantity" min="1" max="5" value="${domainInstace.attribute}">

and Enjoy.......

OTHER TIPS

Within a gsp ?

<g:select id="orderby" name="orderby" from="${1..10}"  noSelection="['':'-Define Display Order 1 top 10 bottom-']" required="" value="${youdomainClassInstance?.orderby}" class="many-to-one"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top