diff --git a/guestbook.module b/guestbook.module
index 94b0d21..529aef3 100644
--- a/guestbook.module
+++ b/guestbook.module
@@ -501,29 +501,37 @@ function guestbook_form_entry_form($form, $form_state, $uid, $display = '', $ent
     // Re-route form submission to guestbook entry edit form submit handler.
     $form['#submit'] = array('guestbook_form_entry_form_edit_submit');
   }
-  if ($user->uid == 0 || (isset($entry['author']) && $entry['author'] == 0)) {
-    // fields for anonymous poster
-    $form['anonname'] = array(
-      '#type' => 'textfield', '#title' => t('Name'),
-      '#size' => 32, '#maxlength' => 64, '#required' => TRUE,
-      '#default_value' => !empty($entry['anonname']) ? $entry['anonname'] : '',
-    );
-    $anonymous_fields = (array) variable_get('guestbook_anonymous_fields', array('email', 'website'));
-    if (in_array('email', $anonymous_fields)) {
-      $form['anonemail'] = array(
-        '#type' => 'textfield', '#title' => t('E-mail'),
-        '#size' => 32, '#maxlength' => 128,
-        '#default_value' => !empty($entry['anonemail']) ? $entry['anonemail'] : '',
-      );
-    }
-    if (in_array('website', $anonymous_fields)) {
-      $form['anonwebsite'] = array(
-        '#type' => 'textfield', '#title' => t('Homepage'),
-        '#size' => 32, '#maxlength' => 128,
-        '#default_value' => !empty($entry['anonwebsite']) ? $entry['anonwebsite'] : '',
-      );
-    }
-  }
+
+  // Fields for anonymous users.
+  $anonymous_fields_access = !$user->uid || (isset($entry['author']) && $entry['author'] == 0);
+  $anonymous_fields = (array) variable_get('guestbook_anonymous_fields', array('email', 'website'));
+
+  $form['anonname'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Name'),
+    '#required' => TRUE,
+    '#default_value' => !empty($entry['anonname']) ? $entry['anonname'] : '',
+    '#size' => 32,
+    '#maxlength' => 64,
+    '#access' => $anonymous_fields_access,
+  );
+  $form['anonemail'] = array(
+    '#type' => 'textfield',
+    '#title' => t('E-mail'),
+    '#default_value' => !empty($entry['anonemail']) ? $entry['anonemail'] : '',
+    '#size' => 32,
+    '#maxlength' => 128,
+    '#access' => $anonymous_fields_access && in_array('email', $anonymous_fields),
+  );
+  $form['anonwebsite'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Homepage'),
+    '#default_value' => !empty($entry['anonwebsite']) ? $entry['anonwebsite'] : '',
+    '#size' => 32,
+    '#maxlength' => 128,
+    '#access' => $anonymous_fields_access && in_array('website', $anonymous_fields),
+  );
+
   $form['message'] = array(
     '#type' => 'text_format',
     '#title' => t('Message'),
