WordCamp Europe 2023 Special Offer - Get 30% OFF any edition with coupon: WC30

Style Checkboxes

If you are using the WS Form framework you can use the following classes to style checkboxes. The demo below is available as a template in the ‘Demo’ tab when you add a new form.

Demos

Tutorials

Buttons

To create button options for checkboxes:

  1. Add a Checkbox field to your form.
  2. Click the settings icon on the checkbox field to open the settings sidebar.
  3. Click the ‘Advanced’ tab at the top of the sidebar.
  4. Enter wsf-button in the ‘Field’ setting. Editing Field
  5. Click ‘Save & Close’ at the bottom of the settings sidebar.
  6. Click ‘Preview’ at the top of the layout editor to test the field.

Switches

To create switch options for checkboxes:

  1. Add a Checkbox field to your form.
  2. Click the settings icon on the checkbox field to open the settings sidebar.
  3. Click the ‘Advanced’ tab at the top of the sidebar.
  4. Enter wsf-switch in the ‘Field’ setting. Editing Field
  5. Click ‘Save & Close’ at the bottom of the settings sidebar.
  6. Click ‘Preview’ at the top of the layout editor to test the field.

Colors

To create color options for checkboxes:

  1. Add a Checkbox field to your form.
  2. Click the settings icon on the checkbox field to open the settings sidebar.
  3. Click the ‘Advanced’ tab at the top of the sidebar.
  4. Enter wsf-color in the ‘Field’ setting. Editing Field
  5. Click the ‘Checkboxes’ tab at the top of the sidebar.
  6. Click the expand icon to make the data grid easier to work with.
  7. Click the add column icon, and name the column ‘Value’.
  8. In the ‘Label’ column, enter: <span style="background-color: #data_grid_row_value;"></span> Color for each row. Change the word ‘Color’ to whatever label you would like for that row.
  9. In the ‘Value’ column, enter the hex color you would like to use for that row, for example: #ff0000.
  10. Underneath the data grid, choose ‘Value’ in the ‘Values’ setting. This tells WS Form which column to use for the checkbox value. Your finished checkbox data grid should look similar to this: Data Grid Configuration For Colored Checkboxes
  11. Click ‘Save & Close’ at the bottom of the settings sidebar.
  12. Click ‘Preview’ at the top of the layout editor to test the field.

Images

To create switch options for checkboxes:

  1. Add a Checkbox field to your form.
  2. Click the settings icon on the checkbox field to open the settings sidebar.
  3. Click the ‘Advanced’ tab at the top of the sidebar.
  4. Enter wsf-image in the ‘Field’ setting. WS Form - Style Checkboxes - CSS Class - Image
  5. Click the ‘Checkboxes’ tab at the top of the sidebar.
  6. Click the expand icon to make the data grid easier to work with.
  7. Click the add column icon, and name the column ‘Value’.
  8. Hover your mouse cursor over the ‘Label’ column and click the ‘Insert Image’ icon  . Select an image from the media library. We recommend sizing the images appropriately before uploading them.
  9. In the ‘Value’ column, enter the value you would like to use when the image is selected.
  10. Underneath the data grid, choose ‘Value’ in the ‘Values’ setting. This tells WS Form which column to use for the checkbox value. Your finished checkbox data grid should look similar to this: Data Grid Configuration For Image Checkboxes
  11. Click ‘Save & Close’ at the bottom of the settings sidebar.
  12. Click ‘Preview’ at the top of the layout editor to test the field.