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

104
Views
Grabbing the input of 3 fields and putting them into an array which would then be used for an API call

I'm working on a project that requires me to grab user input from 3 fields. After submission, these would then be placed into an array which could be used to generate an API call based of these parameters.

<h2>ENTER YOUR INGREDIENTS</h2>
<div class="left"></div>
<div class="right">
    <form class="search-form">
        <input type="text" class="field" id = "form1" placeholder="First Ingredient">
        <input type="text" class="field" id = "form2" placeholder="Second Ingredient">
        <input type="text" class="field" id = "form3" placeholder="Third Ingredient">
        <input type="button" id="btn" value="Submit">Search</button>
    </form>
</div>

This is the HTMl - currently im stuck on actually getting the forms to all submit at once at be placed into an array - i have little JS to show as i've been stuck.

Any help would be great.

about 4 years ago · Juan Pablo Isaza
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!