diff --git a/leaflet.formatters.inc b/leaflet.formatters.inc
index 821250f..7773d02 100644
--- a/leaflet.formatters.inc
+++ b/leaflet.formatters.inc
@@ -453,16 +453,16 @@ function leaflet_token_replace(&$subject, $key, $data = array()) {
 
 /**
  * Helper function to standardize forms between views and field formatters.
- * 
+ *
  * $group - String
  *  The name of the group element to generate.
- * 
+ *
  * $settings - Array
  *  Current form settings (for defaults, etc)
- * 
+ *
  * $options - Array
  *  Special options needed for this form element, if necessary.
- * 
+ *
  * Return - A fully loaded form element.
  */
 function leaflet_form_elements($group, $settings, $options = NULL) {
@@ -489,7 +489,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => $settings[$group]['text'],
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[popup][show]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[popup][show]"],
+            :input[name="options[settings][popup][show]"],
+            :input[name="popup[show]"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -567,7 +569,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#element_validate' => array('leaflet_icon_validate'),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'marker'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'marker'),
           ),
         ),
       );
@@ -580,7 +584,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#element_validate' => array('leaflet_icon_validate'),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'marker'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'marker'),
           ),
         ),
       );
@@ -588,15 +594,19 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#type' => 'select',
         '#title' => t('Marker field'),
         '#description' => t('Field to use as output for a map marker.'),
-        '#options' => array_merge(array('' => ''), $options['fields']),
+        '#options' => isset($options['fields']) ? array_merge(array('' => ''), $options['fields']) : array(),
         '#default_value' => isset($settings[$group]['html']) ? $settings[$group]['html'] : '',
         '#empty_option' => t('-- Select --'),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'html'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'html'),
           ),
           'required' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'html'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'html'),
           ),
         ),
       );
@@ -608,7 +618,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#options' => image_style_options(FALSE, PASS_THROUGH),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'html'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'html'),
           ),
         ),
       );
@@ -619,10 +631,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['htmlClass']) ? $settings[$group]['htmlClass'] : 'leaflet_map_icon',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'html'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'html'),
           ),
           'required' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'html'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'html'),
           ),
         ),
       );
@@ -677,7 +693,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#description' => t('The point from which the shadow is shown.'),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'marker'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'marker'),
           ),
         ),
       );
@@ -704,7 +722,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#description' => t('The point from which the marker popup opens, relative to the anchor point.'),
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[icon][iconType]"]' => array('value' => 'marker'),
+            ':input[name="' . $options['path'] . '[icon][iconType]"],
+            :input[name="options[settings][icon][iconType]"],
+            :input[name="iconType"]' => array('value' => 'marker'),
           ),
         ),
       );
@@ -748,7 +768,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['stroke']) ? $settings[$group]['stroke'] : 1,
         '#states' => array(
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -759,10 +781,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['color']) ? $settings[$group]['color'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"],
+            :input[name="options[settings][vector_display][stroke]"],
+            :input[name="stroke"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -773,10 +799,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['weight']) ? $settings[$group]['weight'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"],
+            :input[name="options[settings][vector_display][stroke]"],
+            :input[name="stroke"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -787,10 +817,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['opacity']) ? $settings[$group]['opacity'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"],
+            :input[name="options[settings][vector_display][stroke]"],
+            :input[name="stroke"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -801,10 +835,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['dashArray']) ? $settings[$group]['dashArray'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke]"],
+            :input[name="options[settings][vector_display][stroke]"],
+            :input[name="stroke"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -815,7 +853,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['fill']) ? $settings[$group]['fill'] : 1,
         '#states' => array(
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -826,10 +866,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['fillColor']) ? $settings[$group]['fillColor'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][fill]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][fill]"],
+            :input[name="options[settings][vector_display][fill]"],
+            :input[name="fill"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -840,10 +884,14 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['fillOpacity']) ? $settings[$group]['fillOpacity'] : '',
         '#states' => array(
           'visible' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][fill]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][fill]"],
+            :input[name="options[settings][vector_display][fill]"],
+            :input[name="fill"]' => array('checked' => TRUE),
           ),
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
@@ -854,7 +902,9 @@ function leaflet_form_elements($group, $settings, $options = NULL) {
         '#default_value' => isset($settings[$group]['clickable']) ? $settings[$group]['clickable'] : 1,
         '#states' => array(
           'enabled' => array(
-            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"]' => array('checked' => TRUE),
+            ':input[name="' . $options['path'] . '[' . $group . '][stroke_override]"],
+            :input[name="options[settings][vector_display][stroke_override]"],
+            :input[name="stroke_override"]' => array('checked' => TRUE),
           ),
         ),
       );
