Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

bootstrap form button is outside of the form div

I am using bootstrap and reactJS.

Please consider the following snippet:

<Form>
    <!--some stuff-->
    <Button type='submit'>
</Form>

the button is rendered outside my form as shown below :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

button is outside the form

How can I bring my button inside of my form please ? I am using sass , so I can override bootstrap propreties if needed.

>Solution :

Just wrap it with a FormGroup and add a minHeight to it:

<FormGroup style={{ minHeight: "50px" }} className="mb-2">
  <Button className="float-end" type="submit" variant="outline-primary">
    Submit
  </Button>
</FormGroup> 

Edit hungry-shadow-6lcp9

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading