Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8031551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:08:08+00:00 2026-06-05T01:08:08+00:00

I have a basic structure as such: <g:form> actionSubmit </g:form> <g:form> actionSubmit </g:form> <g:each

  • 0

I have a basic structure as such:

<g:form>
   actionSubmit
</g:form>

<g:form>
  actionSubmit
</g:form>


<g:each in personList - variable=person>
   <tr>
     <td><g:checkBox name="personList" value="${person.id}" checked="${false}"/></td>
     <td>
         <g:form>
            actionSubmit
         </g:form>
     </td>
   </tr>
</g:each>

Each of these forms relies on the personList checkbox array as a variable. The prior edition of my code wrapped the entire div in a form, which worked but caused problems when I added the third form in the table.

How can I pass the selected checkboxes? I have checkbox that selects all of the boxes – I just need to assign a variable/hiddenField with that array of selected boxes.

Thanks!

Edit

The issue with having a single form is that I have a column in each row has the ability to add elements to a one to many relationship. If I could pass the person.id with the corresponding action submit (so if I hit the actionSubmit on row 2, I want to pass person.id of row 2), then this is a piece of cake.

However, whenever I tried to tie the person ID, I end up with an array of ALL person IDs. So I figured the only way around this is to have separate forms.

                            <td>
                                <div id="reportsToResultsDiv2_${person.id}" class="reportsToResultsDiv2_${person.id}">
                                    <g:select id="reportsTo" name="reportsTo.id" from="${rtResults}" optionKey="id" value="" />
                                    <g:actionSubmit action="addReportsTo" value="Add" params="[c_id:'${person.id}']"/>
                                </div>
                            </td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:08:10+00:00Added an answer on June 5, 2026 at 1:08 am

    I don’t think checkbox supports both value and checked in that way.
    Perhaps this is what you want?

    <g:each in="${personList}" var="person>
        <g:form controller="person" action="doSomething">
            <g:hidden name="personId" value="${person.id}"/>
            <g:checkBox name="superFly" checked="${person.superFly}"/>
        </g:form>
    </g:each>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very basic Table structure to be placed in middle/center of the
My permalink structure is set so I have url.com/page I made a basic PHP
I have a base DLL which defines some basic structure and operation for a
I have a basic recursive table setup in SQL 2008 with the following structure:
What I have is the following db structure(tables): lists[name,id] list_items[title,list_id,content] I've created the needed
i have this basic html structure: <div class=a> <div class=m></div> <div class=m></div> </div> <div
Some open source libraries have tendency to re implement basic structures like string, list,
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear
I have basic hello word example of Prime Faces. I have created dynamic web
I have a basic class that derived subclasses inherit from, it carries the basic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.