I am creating a multi page form with PHP.

I am using JavaScript to allow the user to create new text fields.

```
function add() {
    document.getElementById('wrapper').innerHTML += '<input type="text"><br><br>';
}

```

As it is a multi page form the users have the option to go back to previous pages. The problem is that once the page is reloaded the extra text fields that have been added disappear. How would I go about keeping them on the page once the page is reloaded? Would I need to create a cookie to store the added form elements?