Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

379
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda