Index: explainfield.module
===================================================================
--- explainfield.module	(revision 1010)
+++ explainfield.module	(working copy)
@@ -67,6 +67,13 @@
         '#collapsible' => TRUE,
         '#collapsed' => FALSE,
       );
+      $form['explain_options']['explain_optional'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Optional'),
+        '#default_value' => isset($field['explain_optional']) ? $field['explain_optional'] : '',
+        '#required' => FALSE,
+        '#description' => t('Default explain field behavior is to require input if the trigger value is selected. Check this box to make the explain text optional.'),
+      );
       $form['explain_options']['explain_label'] = array(
         '#type' => 'textfield',
         '#title' => t('Label'),
@@ -109,6 +116,7 @@
       return array(
         'allowed_values',
         'trigger_value',
+        'explain_optional',
         'explain_text',
         'explain_label',
         'max_length',
@@ -444,7 +452,10 @@
     }
     else {
       // Now make sure it *is* filled out and correctly so if it's supposed to be.
-      if (trim($form_state['values'][$field_name][$i]['explainfield']) == '') {
+      if (trim($form_state['values'][$field_name][$i]['explainfield']) == ''
+      && empty($field['explain_optional'])) {
+        dpm($element);
+        dpm($field);
         $error_field = $field_name .']['. $i .'][explainfield';
         form_set_error($error_field, t('Please fill the optional form in %label if you select this option.', array('%label' => t($field['widget']['label']))));
       }
@@ -473,7 +484,10 @@
     }
     else {
       // Now make sure it *is* filled out and correctly so if it's supposed to be.
-      if (trim($form_state['values'][$field_name][$i]['explainfield']) == '') {
+      if (trim($form_state['values'][$field_name][$i]['explainfield']) == ''
+      && empty($field['explain_optional'])) {
+        dpm($element);
+        dpm($field);
         $error_field = $field_name .']['. $i .'][explainfield';
         form_set_error($error_field, t('Please fill the optional form in %label if you select this option.', array('%label' => t($field['widget']['label']))));
       }
