Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

374
Views
HTML/ Javascript: How to submit input and have it fill in a textarea with a submit/add more button

So I am creating a pre-fill resume builder for a class and I want to have only one input area for career experience/ job info but I want a button that can be clicked over and over to submit each jobs information. Ideally the results would show in a textbox below it so they can see and keep track of what they have submitted. I included the code I used on the HTML side: **note: The entire page is basically one form with a submit at the bottom. This is a separate button.

Edited: So the idea is kind of just how submitting a StackOverflow Question works...as you type in the box, the results are shown below. And then there is a form submit button.

Screenshot of the HTML page so far:

enter image description here

<div>
  <fieldset>
    <legend>Work Experience</legend>
    <p>
      <label for="occupation">Job Title</label><br>
      <input type="text" id="occupation" name="occupation"><br>
      <label for="company">Company Name:</label><br>
      <input type="text" id="company" name="company"><br>
      <label for="duties">Duties and Skills Attained:</label><br>
      <input type="text" id="duties" name="duties"><br>
      <button type="button" id="generate">Add Work Eperience</button>
    </p>
  </fieldset>
</div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Not sure I understand completely, but input names support arrays as well. So what you could do is something like this (assuming you want to have a submit for each entry).

<input type="text" id="occupation" name="experience[][occupation]" value="some-previous-occupation">
<input type="text" id="company" name="experience[][company]" value="some-previous-company">

You could then add hidden inputs to keep track of the ones that were already submitted (you could use a loop and replace 0 with the index of the loop)

<input type="hidden" id="occupation" name="experience[0][occupation]">
<input type="hidden" id="company" name="experience[0][company]">

This would then be submitted to your back-end like this:

[
    0 => ['occupation' => 'some-previous-occupation', 'company' => 'some-previous-company']
    1 => ['occupation' => 'developer', 'company' => 'stackoverflow']
]
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!