# Create presets with buttons (save/load slider data)

**URL:** https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830
**Category:** Coding Questions
**Created:** [January 6, 2021, 11:01am UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830 "2021-01-06T11:01:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mem](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Mem](https://discourse.processing.org/u/Mem)
#### Post date: [January 6, 2021, 11:01am UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830/1 "2021-01-06T11:01:49Z")

</div>

Hi,

I would like to save parameters made with sliders as a set of preset with a button, loadable later with this button  
Someone can give direction where I should looking for please

Thank you

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [January 6, 2021, 11:52am UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830/2 "2021-01-06T11:52:11Z")

</div>

**Use a Table**

you can read out the data and make a table from them and load/save the data : [https://www.processing.org/reference/loadTable\_.html](https://www.processing.org/reference/loadTable_.html)

see [https://www.processing.org/reference/Table.html](https://www.processing.org/reference/Table.html)

When you load the table, read the data from the table and set the sliders to the values from the table.

**JSON Data**

you could use this: [https://www.processing.org/reference/saveJSONArray\_.html](https://www.processing.org/reference/saveJSONArray_.html)

with loadJSONArray

**Tutorial**

see also [https://www.processing.org/tutorials/data/](https://www.processing.org/tutorials/data/)

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [January 6, 2021, 12:18pm UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830/3 "2021-01-06T12:18:56Z")

</div>

> [@Creating and Populating a Table From Scratch](https://discourse.processing.org/t/creating-and-populating-a-table-from-scratch/12658/3):
>
> I’ve made a sketch that stores and reads an array of CSV row strings from the browser’s local storage using storeItem() & getItem() respectively; then converts that array to p5.TableRow objects; and finally use p5.Table::addRow() to populate a p5.Table container: card_index_dividers[http://p5js.org/reference/#/p5/getItem](http://p5js.org/reference/#/p5/getItem)[http://p5js.org/reference/#/p5.Table/addRow](http://p5js.org/reference/#/p5.Table/addRow) Each mouse click adds a new p5.TableRow to the p5.Table container, updating the browser’s local storage as well. …

---

<div class="post-metadata">

### Author: ![Mem](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Mem](https://discourse.processing.org/u/Mem)
#### Post date: [January 6, 2021, 12:43pm UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830/4 "2021-01-06T12:43:46Z")

</div>

Thanks Chris for this fast reply 🙂

I will try

---

<div class="post-metadata">

### Author: ![Mem](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Mem](https://discourse.processing.org/u/Mem)
#### Post date: [January 6, 2021, 12:45pm UTC](https://discourse.processing.org/t/create-presets-with-buttons-save-load-slider-data/26830/5 "2021-01-06T12:45:27Z")

</div>

Thank you also for the quick answer 🙂
