Search code examples
grailsgspnumericupdown

grails: select like numeric up down


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?


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.......