lundi 29 avril 2019

Grails how to use a checbox tag like a select tag

Hello everyone I need your help, I'm using grails and I'm trying to show a list of available users and you can select one or several, and those that are already selected are marked and those that can not be marked, currently works with the tag select but that only shows me the name and I can select one or several but I need to keep ctrl, that's why I want a checkbox to appear on the left and on the right the name of the user and if it is selected function same as in the select tag when saving.

This is my code with select tag:

<g:select name="abogados"
          from="${User.list()}"
          multiple="yes"
          optionKey="id"
          style="width:500px;font-size: 15px;height: 500px;text-align: center"
          value="${userInstance?.abogados}" />




Aucun commentaire:

Enregistrer un commentaire