Webform values for select options

There are two issues related to select options for Webform based forms.

  1.  There is no boolean version of a checkbox (there is a module specifically for it but as of this date, it does not save the boolean value in any way that is visible in reporting... a known bug) So to get values you have to put them in as select options but only one option and set it to multiple in order to get it as a check box (single multi select is an oxymoron, I know.)
  2.  The values that get reported (when exported or viewed) is actually the value label not the key and not the value with a boolean so it is important to keep the values short so they make nice output.
  3.  In order to keep the values short, you have to use jQuery to inject the meaningful text into the form label for the option so they can be meaningful to users.

Example: a form with an "order a guide" and an "email signup"

  1. Create your form with an select option and a markup section to hold the jQuer
    [[{"type":"media","view_mode":"media_original","fid":"73","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]] 
  2. The options key value pairs should look like
     [[{"type":"media","view_mode":"media_original","fid":"74","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
  3. The jquery in the "Markup element would look like this:
     [[{"type":"media","view_mode":"media_original","fid":"75","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
  4. Set up your thankyou page to display the options so tracking can track it (on the Webform/configure tab by selecting "Form Settings" in the Webform sub-tab.
     [[{"type":"media","view_mode":"media_original","fid":"76","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]



section:

modules: