I've had this problem ever since I started using CKForms 1.2.0. The solution I found is fairly simple and requires editing of /components/com_ckforms/models/ckforms.php. Note, you should back up the original before making any changes just to be safe.
This file has changed with practically each new revision since 1.2.0, but for version 1.3.4_b2 change line 457 from:
- Code: Select all
$mailBody = $mailBody.$field->label . " : " . $fieldValue . "<br />\n";
To:
- Code: Select all
if ($fieldValue != "") {
if (!is_null($field->label)) {
$mailBody = $mailBody.$field->label . " : " . $fieldValue . "<br />\n";
}
else {
$mailBody = $mailBody.$field->name . " : " . $fieldValue . "<br />\n";
}
}
This removes empty fields (such as horizontal rule lines) from the message you receive and additionally, should a field label be blank for any reason, replaces the blank field label to the field name.
You'll also want to change line 561 or 569 (depending if you've already made the previous change). This will apply the fix to email receipts users would receive.
Blessings,
Chris