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

  • SEARCH
  • Home
  • 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 8240049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:21:15+00:00 2026-06-07T20:21:15+00:00

I have a website with a series of empty text fields that the user

  • 0

I have a website with a series of empty text fields that the user can edit. Next to each text field is a check box as follows:

<input type="text" id="textfield1" size="60" /><input type="checkbox"> <br />
<input type="text" id="textfield2" size="60" /><input type="checkbox"> <br />
<input type="text" id="textfield3" size="60" /><input type="checkbox"> <br />

Once a user clicks submit, is there a way of iterating through the textinput and checkbox pair on a line by line basis?

for example, is it possible to somehow group the textfield and check box together and iterate through these groups going group.textfield.value =? and group.checkbox.value = ?

I need an easy way to determine the text of a field and whether or not that particular field had it’s check box selected

  • 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-07T20:21:17+00:00Added an answer on June 7, 2026 at 8:21 pm

    Just iterate through the text inputs, and use .nextSibling to grab each adjacent checkbox.

    Make sure you don’t introduce any whitespace between them.


    Another option is to group them in fieldset elements…

    <fieldset>
        <input type="text" id="textfield1" size="60" /><input type="checkbox">
    </fieldset>
    <fieldset>
        <input type="text" id="textfield2" size="60" /><input type="checkbox">
    </fieldset>
    <fieldset>
        <input type="text" id="textfield3" size="60" /><input type="checkbox">
    </fieldset>
    

    …then iterate the fieldset elements, and use .children[0] and .children[1]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So basically I have website that has names of cities that can be checked
I have a table that defines the possible categories in my website - fields
I have a C# website that has a a user control where I initialize
I have a series of buttons on my website that have I want to
I have website where users can login with their Facebook account. I am using
I'm trying to play on iPhone's Safari so i can have website menu bar
I'm using jQuery. I have website feature that does an ajax search and returns
I have a website that is mainly based on JavaScript. It uses a REST
I have a series of forms in my html, the intention is that when
I'm writing a report that shows total downtime for our website. When a user

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.