Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

66
Views
Hi. I wrote the code for popup in reactjs but the validation is not working on each input field inside popup
    I am creating a functional component called EmptyZoo.
   const EmptyZoo = () => {
    /* Here i created onSubmit function
    function onSubmit(event) {
        event.preventDefault();
        // calling the API by Axios.
        let response = () => {
          Axios.post("http://localhost:8081/zoo/save", {
            name: inputValues.name,
            address1: inputValues.address1,
            country: locations.country,
          })
      }

// here i have created modal part return ( // Here when i click the button below the modal opens Add Zoo // Modal part // Modal Header <Modal.Header closeButton> <Modal.Title>Modal heading</Modal.Title> </Modal.Header> // Modal Body <Modal.Body> Name: <input type="text" name="name" id="user" className="form-control" required placeholder={t("Name")} value={inputValues.name} onChange={handleChange} /> // Country Country: Select: Country {locations.map((location) => ( {location.country} ))} </Modal.Body> // Footer element <Modal.Footer> Close Submit </Modal.Footer> // this is my end of the code

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.