1

I have a website running EE 2.5.2 with Freeform Pro 4.0.6. The website is about events people can subscribe to. Freeform is currently used to subscribe to one event. All events are (of course) entries in a channel field.

I’m looking for a way my users can use a select multiple events from a list of checkboxes and do a ‘multi-subscribe’.

In Freeform, I found the ‘checkbox group’ field with ‘load from channel field’ option. But it just displays a list of titles. I would like to (at least) also include a date and order the choices by date. Possibly I’d like to also include a category field.

Any help, ideas or examples are appreciated!

1 Answer 1

0

You can create a checkbox group field based on the "load from channel field" option, which will create a list of checkboxes with either entry titles or content of a custom field as labels.

If you're looking for more flexibility, however, the only option available is to manually create your own checkbox group list in a template. This can be done by using the {exp:freeform:form} tag and creating your checkbox group using {exp:channel:entries}, {exp:channel:categories} or whatever tag you need to create the list.

For example, let's say you created a field (textarea) called form_events. You would create your dropdown like this:

{exp:freeform:form /* Your other parameters here */}

  <h3>Choose your events</h3>
  {exp:channel:entries channel="events" orderby="date" dynamic="no"}
      <input type="checkbox" name="form_events[]" value="{entry_id}" />{title} - {entry_date format="%Y-%m-%d"}<br />
  {/exp:channel:entries}

  // The rest of the form
{/exp:freeform:form}

This way you have control over the checkbox labels, the ordering, etc.

The above field example will save your selected "event" channel entries as newline-delimited entry_ids in the form_events Freeform custom field. Please note that the brackets [] in name="form_events[]" are necessary in HTML forms to submit and save an array of form data.

1
  • Exactly what I was looking for! Thank you! Maybe it will help other Freeform Pro users if this kind of 'how-to' is added to the documentation? Just an idea..
    – Fat Pixel
    Commented Mar 4, 2014 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.