<p>This my solution, although it's not perfect. I set-up an entry loop within the form and included the following for a series of checkboxes:</p>

<pre><code>{% if loop.index == "2" %}

&lt;label&gt;
    &lt;input type="checkbox"
        name="{{ course2.handle }}[]"
        value="{{ course2.value }}"
        {{ course2.checked ? "checked" : "" }}
    /&gt;
&lt;/label&gt;

&lt;input type="hidden" name="{{ courseName2.handle }}" value="{{ entry.title 
}} | {{ entry.courseDate|date('j.n.y') }}"  /&gt;

{% endif %}
</code></pre>

<p>So in the form submission the entry title in loop 2 is attached to the Course 2 checkbox. It would have been better if {loop.index} could be used within the handle name so the 'if' conditional is not needed. As pointed out above, the value of the checkbox can be set dynamically from the entry loop, but the result is not shown in the FreeForm control panel, just the email notification. Therefore is was necessary to include the hidden field to record the entry title. Hope that all makes sense.</p>

CC BY-SA 3.0
2017-11-21T09:38:36.737Z
2017-11-21T09:38:36.737Z
Andrew
<p>Is is possible to populate a FreeForm checkbox group by an entries listing? I've got a series of courses with an entry for each one, and I'd like to create a series of checkboxes and values for each course. </p>

<p>The value of the checkbox gets shown in the email notification but not in the control panel. Is this possible to change? </p>

CC BY-SA 3.0
2017-11-20T17:02:15.620Z
I ended up creating a series of checkboxes with related hidden fields. Then used a conditional within the entry loop in the form to associate an entry title with a checkbox number. Not the smoothest solution, so if there is a better way please let me know!
Andrew
CC BY-SA 3.0
2017-11-20T20:40:55.103Z
Would you mind adding your solution as an official answer instead of an update to your original question?
Brad Bell
<plugin-freeform><solspace>
Freeform check box group from entries
# Freeform check box group from entries

(Asked by: username_0 on 2017-11-15)

Is is possible to populate a FreeForm checkbox group by an entries listing? I've got a series of courses with an entry for each one, and I'd like to create a series of checkboxes and values for each course.

The value of the checkbox gets shown in the email notification but not in the control panel. Is this possible to change?

**Tags:** plugin-freeform, solspace

> **Comments:**
> **username_0**: I ended up creating a series of checkboxes with related hidden fields. Then used a conditional within the entry loop in the form to associate an entry title with a checkbox number. Not the smoothest solution, so if there is a better way please let me know!  
> **username_1**: Would you mind adding your solution as an official answer instead of an update to your original question?  

---

## 1 answers

### Answer by username_0 on 2017-11-21. Score: 1

This my solution, although it's not perfect. I set-up an entry loop within the form and included the following for a series of checkboxes:
{% if loop.index == "2" %}


    




{% endif %}

So in the form submission the entry title in loop 2 is attached to the Course 2 checkbox. It would have been better if {loop.index} could be used within the handle name so the 'if' conditional is not needed. As pointed out above, the value of the checkbox can be set dynamically from the entry loop, but the result is not shown in the FreeForm control panel, just the email notification. Therefore is was necessary to include the hidden field to record the entry title. Hope that all makes sense.


---

