---
title: 'Plugin Variable Chart ID'
url: 'https://manuals.remository.com/plotalot/advanced-techniques/plugin-variable-chart-id'
markdown: 'https://manuals.remository.com/plotalot/advanced-techniques/plugin-variable-chart-id.md'
date: '2026-10-06'
description: 'When you call the plugin, you normally specify a Chart ID like this: {plotalot id="68"} If you specify a non-numeric Chart ID, the plugin retrieves the value as a Get or Post variable. For example: {plotalot id="chart_id"} Retrieves the value of the "chart_id" variable. You could pass the "chart_id…'
taxonomy:
  category:
    - docs
---

[](#) [ edit this page](https://github.com/getgrav/grav-skeleton-rtfm-site/blob/develop/pages/14.advanced-techniques/08.plugin-variable-chart-id/docs.md) 

  [ Plotalot for Joomla ](https://manuals.remository.com/plotalot/)     [ Advanced Techniques ](https://manuals.remository.com/plotalot/advanced-techniques)      Plugin Variable Chart ID    

# Plugin Variable Chart ID

When you call the plugin, you normally specify a Chart ID like this:

```
{plotalot id="68"}
```

If you specify a non-numeric Chart ID, the plugin retrieves the value as a Get or Post variable. For example:

```
{plotalot id="chart_id"}
```

Retrieves the value of the "chart\_id" variable. You could pass the "chart\_id" parameter on a URL, like this:

```
http://www.mysite.com/my-charts?chart_id=68
```

#### Selecting a Chart From a List

You can use a variable chart ID to create a select list of charts in an article:

```
<form action="" method="get">Select an Area<br />
<select name="cid" size="1" onchange="this.form.submit()">
    <option value="0">Select an Area</option>
    <option value="38">Europe</option>
    <option value="39">North America</option>
    <option value="40">South America</option>
    <option value="41">Asia</option>
    <option value="42">Australia</option>
</select>
</form>
{plotalot id="cid" error_txt=" "}
```

![img-104](https://manuals.remository.com/plotalot/user/pages/14.advanced-techniques/08.plugin-variable-chart-id/img-104.png "img-104")

There are a few things to explain here:

- The "onchange" attribute submits the form automatically when a selection is made.
- The select list sends back a Get parameter, "cid", containing the selected chart ID.
- The chart ID in the plugin call is "cid", so the plugin will use the value of "cid" as the chart ID.
- The first time the article is opened, "cid" will be empty, so to avoid an error, we added the error\_txt parameter with a single space, so that nothing is shown.

 [ ](https://manuals.remository.com/plotalot/advanced-techniques/assigning-the-result-of-a-single-item) [](https://manuals.remository.com/plotalot/advanced-techniques/loading-charts-asynchronously)

---

## Navigation

- Parent: [Advanced Techniques](https://manuals.remository.com/plotalot/advanced-techniques.md)
- Previous: [Assigning the Result of a Single Item](https://manuals.remository.com/plotalot/advanced-techniques/assigning-the-result-of-a-single-item.md)
- Next: [Loading Charts Asynchronously](https://manuals.remository.com/plotalot/advanced-techniques/loading-charts-asynchronously.md)
