<p>There are a few possible ways to do this right now (Sprout Forms v2.3.4), all likely with a few trade-offs. We do have this situation on our radar to improve on in the future.</p>

<ol>
<li><p>You could consider updating how you are storing those checkbox fields to use one or multiple Sprout Fields <a href="https://sprout.barrelstrengthdesign.com/craft-plugins/fields/docs/overview/hidden-field" rel="nofollow noreferrer">Hidden Fields</a>. With this method, the first page with your initial options doesn't need to be a part of the Form and you could dynamically populate the hidden field with the value of whatever is selected. The trade-off here may be in how you wish to create reporting around your data, and whether this format makes that easier or harder.</p></li>
<li><p>You could manage a multi-page form using a Javascript library on the front-end (something like <a href="http://parsleyjs.org/doc/examples/multisteps.html" rel="nofollow noreferrer">parsley.js</a>). The trade-off here is that you have to add a javascript library to your setup, if you don't already need it for other things. We do have multi-page form support on our list. </p></li>
<li><p>You can also do this by building your Form using <a href="https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/custom-html" rel="nofollow noreferrer">Custom HTML</a>. The trade-off here is that things become harder to maintain for a fairly small item.</p></li>
<li><p>It might be possible to use <a href="https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/customization/template-overrides" rel="nofollow noreferrer">Template Overrides</a> and modify how the "value" parameter gets processed to make the <code>value</code> variable for your checkbox field use the initially selected items.  I expect this path would get tricky. The template you'd probably want start with when overriding things is the <code>field.html</code> template and the line that sets the value: <code>{%- set value            = ... %}</code>.</p></li>
</ol>

CC BY-SA 3.0
2016-12-08T17:47:50.110Z
2016-12-08T17:47:50.110Z
Ben Parizek
<p>I'm trying to create a &quot;teaser&quot; form in Sprout Forms.</p>
<p>First form has radio buttons and a group of checkboxes, and it's easy to pass the radio value (via redirect), but I'm not finding the documentation on how to pass checkbox fields as URL params.</p>
<p>Redirect: /contact/?radio_button={radio_value}&amp;checkbox={fields-goals-1}</p>
<p>The second form will accept those params and ask for contact information.</p>
<p>Anyone got an example of how this?</p>
<p><a href="https://i.sstatic.net/1ehMi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1ehMi.png" alt="Screen shot of checkbox options" /></a></p>

<plugin-sproutforms>
Sprout Forms: Passing Checkbox variable in url parameter
# Sprout Forms: Passing Checkbox variable in url parameter

(Asked by: username_0 on 2016-12-05)

I'm trying to create a "teaser" form in Sprout Forms.

First form has radio buttons and a group of checkboxes, and it's easy to pass the radio value (via redirect), but I'm not finding the documentation on how to pass checkbox fields as URL params.

Redirect: /contact/?radio\_button={radio\_value}&checkbox={fields-goals-1}

The second form will accept those params and ask for contact information.

Anyone got an example of how this?

[![Screen shot of checkbox options](https://i.sstatic.net/1ehMi.png)](https://i.sstatic.net/1ehMi.png)

**Tags:** plugin-sproutforms


---

## 1 answers

### Answer by username_1 on 2016-12-08. Score: 1 | Accepted answer

There are a few possible ways to do this right now (Sprout Forms v2.3.4), all likely with a few trade-offs. We do have this situation on our radar to improve on in the future.

1. You could consider updating how you are storing those checkbox fields to use one or multiple Sprout Fields [Hidden Fields](https://sprout.barrelstrengthdesign.com/craft-plugins/fields/docs/overview/hidden-field). With this method, the first page with your initial options doesn't need to be a part of the Form and you could dynamically populate the hidden field with the value of whatever is selected. The trade-off here may be in how you wish to create reporting around your data, and whether this format makes that easier or harder.
2. You could manage a multi-page form using a Javascript library on the front-end (something like [parsley.js](http://parsleyjs.org/doc/examples/multisteps.html)). The trade-off here is that you have to add a javascript library to your setup, if you don't already need it for other things. We do have multi-page form support on our list.
3. You can also do this by building your Form using [Custom HTML](https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/custom-html). The trade-off here is that things become harder to maintain for a fairly small item.
4. It might be possible to use [Template Overrides](https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/customization/template-overrides) and modify how the "value" parameter gets processed to make the `value` variable for your checkbox field use the initially selected items. I expect this path would get tricky. The template you'd probably want start with when overriding things is the `field.html` template and the line that sets the value: `{%- set value = ... %}`.


---

