diff --git a/gmap_macro_builder.module b/gmap_macro_builder.module
index 7bb1826..25f9f8c 100644
--- a/gmap_macro_builder.module
+++ b/gmap_macro_builder.module
@@ -49,7 +49,7 @@ function gmap_macro_builder_menu($may_cache) {
  * @param $settings
  *   Additional settings to apply to the macro map.
  */
-function gmap_macro_builder_form($settings = array()) {
+function gmap_macro_builder_form($settings = array(), $hide = null) {
   $form['macroform'] = array(
     '#type' => 'fieldset',
     '#title' => t('Gmap macro creation'),
@@ -68,7 +68,7 @@ function gmap_macro_builder_form($settings = array()) {
     ), $settings),
   );
 
-  $defaults = gmap_defaults();
+  $defaults = array_merge(gmap_defaults(), $settings);
 
   $form['macroform']['overlayedit'] = array(
     '#type' => 'gmap_overlay_edit',
@@ -150,5 +150,20 @@ function gmap_macro_builder_form($settings = array()) {
     '#default_value' => '',
     '#title' => t('Macro text'),
   );
+
+  if (isset($hide) && is_array($hide)) {
+    foreach ($hide as $field => $mode) {
+      if (!isset($form['macroform'][$field])) continue;
+      if ($mode == 1) {
+        $form['macroform'][$field]['#type'] = 'hidden';
+        $form['macroform'][$field]['#value'] = $form['macroform'][$field]['#default_value'];
+      }
+      else if ($mode == 2) {
+        $form['macroform'][$field]['#prefix'] = '<div style="display: none;">';
+        $form['macroform'][$field]['#suffix'] = '</div>';
+      }
+    }
+  }
+
   return $form;
 }
