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

89
Views
Adding Dropdown menu inside React Form

I am in the process of implementing a room reservation system. I want to add 2-4 different room types, but I try to add a dropdown menu so you can choose from the 2-4 room types and that you do not write it yourself, I'm using/following this. I have tried to apply <Form.Select...>, that did not work.

I've searched everywhere but I could not find anything useful.

"react": "^17.0.2",
"react-bootstrap": "^1.6.4",

Here's my code:

                    <Form.Row className="mb-lg-3">
                        <Form.Group as={Col} controlId="roomTypeSelection" lg="4" md="12">
                            <Form.Label>Room Type:<span className="text-danger">*</span></Form.Label>
                            <Form.Control
                                ref={manufacturerInputRef}
                                onChange={handleChange}
                                name="roomTypeSelection"
                                value={values.roomTypeSelection}
                                type="text"
                                placeholder="Type your desired room..."
                                isInvalid={!!errors.roomTypeSelection}
                                isValid={touched.roomTypeSelection && !errors.roomTypeSelection}
                            />
                            <Form.Control.Feedback type="invalid">
                                {errors.roomTypeSelection}
                            </Form.Control.Feedback>
                        </Form.Group>
                    </Form.Row>

I've tried to implement (taken from the site, that I've linked to) into my code above, but it is not working together, it is working separately:

                            <Form.Select>
                                <option>Open this select menu</option>
                                <option value="1">One</option>
                                <option value="2">Two</option>
                                <option value="3">Three</option>
                            </Form.Select>

That gave me a blank screen on my page.

How should I do that and implement a dropdown menu inside the Forms? How does Form.Control settings work, how can I instead of text add a dropdownlist, is there a keyword for that?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You are using React bootstrap for adding dropdown menu inside react form. To solve this, you can use this tag. Try this one:

<form>
   <label>
       Room type:
       <select>
           <option value="1">One</option>
           <option value="2">Two</option>
           <option value="3">Three</option>
       </select>
   </label>
</form>
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!