Default Fieldtypes
Freeform Classic includes these default fieldtypes:
Checkbox
The Checkbox fieldtype is simple and outputs a checkbox with data set to y with n as the default.
Freeform:Form Output
attr:NAME
{freeform:field:FIELD_NAME attr:id="my_id" attr:class="my_class"
attr:onclick="myFunction();" }
This field type allows the usage of form field attributes such as class, id, and onclick. Just call these as parameters on the field variable, and use the construct of: attr: + ATTRIBUTE_NAME = attr:ATTRIBUTE_NAME. For example, the class attribute would be attr:class.
Freeform:Entries Output
The output can be handled with two different approaches. It can be parsed as a regular variable: {freeform:field:FIELD_NAME}
Or it can also be used as a variable pair: {freeform:field:FIELD_NAME} stuff {/freeform:field:FIELD_NAME}
If using the variable pair method, the value of the field is parsed with the {freeform:data:value} and {freeform:data:label} variables, inside of the variable pair.
Checkbox Group
Checkbox Group sets use the multi-list item choice settings and can load single items, value label lists, load from a channel field, or load from a text area (newline delimited).
Freeform:Form Output
When you are displaying a checkbox group field on the front end, you have some parameters you can supply to the {freeform:field:FIELD_NAME} variable:
attr:NAME
{freeform:field:FIELD_NAME attr:id="my_id" attr:class="my_class"
attr:onclick="myFunction();" }
This field type allows the usage of form field attributes such as class, id, and onclick. Just call these as parameters on the field variable, and use the construct of: attr: + ATTRIBUTE_NAME = attr:ATTRIBUTE_NAME. For example, the class attribute would be attr:class.
wrapper_open
wrapper_open="<ul style="list-style:none; padding:0;">"
This parameter allows you to control the opening wrapper around all checkbox options/rows. Default is: <ul style="list-style:none; padding:0;"\>
wrapper_close
wrapper_close="</ul>"
This parameter allows you to control the closing wrapper around all checkbox options/rows. Default is: </ul>
row_wrapper_open
row_wrapper_open="<li>"
This parameter allows you to control the opening wrapper for each checkbox option/row. Default is: <li>