diff --git a/scripts/dnd.js b/scripts/dnd.js
index bba8d03d..930e0149 100644
--- a/scripts/dnd.js
+++ b/scripts/dnd.js
@@ -70,15 +70,18 @@ function asend() {
// get all form fields
var f = new FormData(document.form1);
+ var t;
// append text for CKEDITOR and textarea, respectively
if (typeof f.delete == 'function') // not avalable in all browsers
f.delete("Text");
if (typeof(CKEDITOR) != 'undefined')
t = CKEDITOR.instances.Text.getData();
- else
+ else if (document.form1.Text != undefined)
t = document.form1.Text.value;
- f.append("Text", t);
+
+ if (t != undefined)
+ f.append("Text", t);
// add jcmd
f.append("jcmd", "Save");
diff --git a/src/elogd.c b/src/elogd.c
index fe9bca10..00b52280 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -10435,7 +10435,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
loc("Submit"));
rsprintf("\n",
loc("Save"));
- rsprintf("\n",
+
+ if (!getcfg(lbs->name, "Show text", str, sizeof(str)) || atoi(str) == 1)
+ rsprintf("\n",
loc("Preview"));
rsprintf("\n",
loc("Back"));
@@ -11948,8 +11950,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
loc("Submit"));
rsprintf("\n",
loc("Save"));
- rsprintf("\n",
+
+ if (!getcfg(lbs->name, "Show text", str, sizeof(str)) || atoi(str) == 1)
+ rsprintf("\n",
loc("Preview"));
+
rsprintf("\n",
loc("Back"));