---
title: Forms and Bootstrap
---

Forms are everywhere on the web and we will need some for our project as well. Rather than walk you through this step by step, we're going to practice taking some HTML snippets from the Bootstrap docs and creating our page so that our design matches the Bootstrap examples.&#x20;

Our form is going to be in the `/manage/manageArticles.bxm` page and needs the following elements. Style them after the floating labels examples at [https://getbootstrap.com/docs/5.3/forms/floating-labels/](https://getbootstrap.com/docs/5.3/forms/floating-labels/)

* A text input with the and and label `Title`
* A textarea with the name and label `description`
* A checkbox with the name and label `Active`


First we need to put in some temporary code to help up develop.

```html linenums="1" insert="1" title="This allows us to dump out the form content"
<bx:dump var="#form#" />    
```

```html linenums="7" insert="1 2-18" title="Adding the Article Data Collection Form"
<div class="col-sm-9">
    <form method="POST" action="#cgi.script_name#" >
        <div class="form-floating mb-3">
            <input type="text" class="form-control" id="floatingInput" placeholder="Article Title" name="title">
            <label for="floatingInput">Title</label>
        </div>
        <div class="form-floating">
            <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea" name="description"></textarea>
            <label for="floatingTextarea">Content</label>
        </div>
        <div class="form-check">
            <input class="form-check-input" type="checkbox" value="1" id="checkDefault" name="active">
            <label class="form-check-label" for="checkDefault">
                Active
            </label>
        </div>
        <button type="submit" class="btn btn-primary">Save</button>
    </form>
</div>
```
