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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:42:23+00:00 2026-06-14T22:42:23+00:00

I have some dynamically added text boxes along with some static ones. The problem

  • 0

I have some dynamically added text boxes along with some static ones. The problem I’m having is when I remove an item from one of the dynamic forms, unless I have it wrapped with form tags, it will only remove the last item from the list. However, when I wrap it in form tags, then the static text boxes won’t post. Basically I’m just wondering how to properly use tags if I want to submit textboxes.

For example,

<form method="post">
<textbox 1>
<textbox 2>
<textbox 3>

<?
 $tasks->task_form();

?>
 <another textbox> //these text boxes don't POST when the dynamic forms have tags wrapped around them
 <another textbox>
<?    
 $users->dynamic_form_2();
?>

</form>

For example, here’s the task_form

function task_form(){

//textbox and submit to add tasks here (omitted to keep shorter)

foreach (array_combine($task, $task_num) as $task => $task_num){
            ?>
            <form method="post">
            <tr><td><? echo $task; ?></td><td><? echo $task_num; ?></td>
            <td><input type="submit" name="remove_task" value="Remove"/></td>
            <td><input type="hidden" name="task_name" value="<? echo $task; ?>"/>
            <td><input type="hidden" name="task_num" value="<? echo $task_num; ?>"/></td></tr>
            </form>
            <?
        }

}

If I don’t place the form tags around the dynamic forms, then the last item from that form is removed regardless of which one I try to remove. However, with the form tags, then the values from some of the text boxes don’t POST at all.

  • 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-14T22:42:25+00:00Added an answer on June 14, 2026 at 10:42 pm

    This is probably not the cleanest solution, but you could use a toolkit like jQuery and on click of one of your submit button, simply send ajax queries for each forms in parallel, and when everything is done, redirect to another page.

    I would still strongly advise that you review your forms, it should probably be a single form!

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

Sidebar

Related Questions

I am loading some text dynamically into a div, but have the problem that
I have some link elements which are dynamically added and hidden from the page.
I have a table. Some rows are dynamically added by jquery. The first <td>
i have a li tag which was dynamically added. To that based on some
Does jq.carousel support dynamically added images? I have 'some' button, o I have a
I have a page where some html is being dynamically added to the page.
Greetings. I have some inputs dynamically added to form. <input name=input_names[] /> When form
Fiddle: http://jsfiddle.net/MhWm5/16/ I have some dynamically generated table rows/values with dynamic IDs <td class=control-group>
I have some code that dynamically creates a new button through JavaScript that when
I have some flags I store in my mysql database so I can dynamically

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.