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 7995155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:19:35+00:00 2026-06-04T14:19:35+00:00

I have a form that looks like so: <label for=fullpath><span class=required>*Full Path of folder

  • 0

I have a form that looks like so:

<label for="fullpath"><span class="required">*Full Path of folder to change access:</span></label>
            <input name="fullpath" id="it10" type="text" size="50" maxlength="50" />
            <br />
            <small>Example: g:\A\Folder or j:\Your\Folder</small><br />
            <div class="bgdiff">
              <label for="userpermissiongroup">User Permission Group to be changed:</label>
              <input name="userpermissiongroup" type="text" id="it11" size="50" maxlength="50" />
              <small>If Known...</small></div>
            <br />
            <label for="addreadaccess">Additional users requiring read access:</label>
            <input name="addreadaccess" type="text" id="it12" size="15" maxlength="15" />
            <br />
            <small>AD Username</small><br />
            <div class="bgdiff">
              <label for="addauthoraccess">Additional users requiring author access:</label>
              <input name="addauthoraccess" type="text" id="it13" size="12" maxlength="12" />
              <br />
              <small>AD Username</small></div>
            <br />
            <label for="removeaccess">Users to be removed from access:</label>
            <input name="removeaccess" type="text" id="it14" size="12" maxlength="12" />
            <br />
            <small>AD Username</small><br />
            <div class="bgdiff">
              <label for="supervisor"><span class="required">*Data Steward, Program Manager, Project Lead, or Supervisor who can authorize access changes:</span></label>
              <input name="supervisor" type="text" id="it15" size="30" maxlength="30" />
              <br />
              <small>AD Username</small></div>
            <br/>
            <label for="phoneapprover"><span class="required">*Phone number of approving official: </span></label>
            <input name="phoneapprover" type="text" id="it16" size="30" maxlength="30" />
            <br />
            <small>999-999-9999</small><br />
          </fieldset>
        </div>

I would like to give users the option to add all of this info to this form more than 1x before submitting. (say 10x max) I have run a couple ideas through my head. 1 is using Javascript to create the new fields and then parse them with my php script somehow. 2 is put say 10 code snips just like the form above in the code and hide them until the user clicks ADD ANOTHER.

Each input needs to be unique as I am submitting this info thought a simple $_REQUEST php script. I understand how to do this with 1 input and a for each loop, but am not sure how to make it work with such a large amount of inputs, labels, etc…

<?php
foreach($_POST['newdata'] as $value) {
echo "$value <br />";
}
?>

Anyone have some suggestions on the best way to go about this? I am not sure adding his form via JS is the best idea, so just displaying the new info from a hidden div seems quicker and easier…

  • 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-04T14:19:36+00:00Added an answer on June 4, 2026 at 2:19 pm

    If you append [] to your form field names, PHP will take those fields and turn them into an array, e.g.

    <input type="text" name="field[]" value="first" />
    <input type="text" name="field[]" value="second" />
    <input type="text" name="field[]" value="third" />
    

    would produce the following $_POST structure:

    $_POST = array(
        'field' => array(
             0 => 'first',
             1 => 'second',
             2 => 'third',
        )
    );
    

    The alternative is to append incrementing numbers to each field name, as you duplicate the existing field sets for each new block. This provides a nice separation between blocks and allows you guarantee that related fields have the same numerical tag, but it does complicate processing.

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

Sidebar

Related Questions

I have a form that looks like this: class SampleForm(forms.Form): text = forms.CharField(max_length=100) In
I have a form that looks kind of like this: <div> <div class=contact> <h1>Person's
I have a form that looks like: <form action=search.php method=post> <fieldset> <label for=level_one>Main category</label>
I have a form that looks like this: <td>Starts</td> <td><label for=mm></label> <select name=mm id=mm>
I have a form that looks like this. <form action=index.php method=post> <select name=dropdownOption> <option
I have a simple form that looks like so <% remote_form_for post, :url =>
I have a sub form that looks like a datasheet view. It returns prices
I have a pretty simple ASP.NET Web Form that looks a bit like the
I have code that looks like the following: <form id=MyForm name=MyForm method=post action=index.php> <input
I have a form element that I'm setting as required: $this->addElement('text', 'email', array( 'label'

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.