Hello,
Sorry for the late response, Crosstec Support staff was on collective holiday vacation, as noted in the forum.
First, if you want to remove 'SUBMITTED', 'USER_ID' and other metadata from the csv go to joomla/administrator/components/com_breezingforms/admin and in the
recordmanagment.class.php file around line 2571 you need to comment out the following code as stated in the link you've sent:
$fields['ID'] = true;
$fields['SUBMITTED'] = true;
$fields['USER_ID'] = true;
$fields['USERNAME'] = true;
$fields['USER_FULL_NAME'] = true;
$fields['TITLE'] = true;
$fields['IP'] = true;
$fields['BROWSER'] = true;
$fields['OPSYS'] = true;
$fields['TRANSACTION_ID'] = true;
$fields['DATE'] = true;
$fields['TEST_ACCOUNT'] = true;
$fields['DOWNLOAD_TRIES'] = true;
This will only remove the header as you wrote, so to remove the values as well, around line 2617 comment out this piece of code as well:
$lines[$lineNum]['ID'][] = $rec->id;
$lines[$lineNum]['SUBMITTED'][] = $rec->submitted;
$lines[$lineNum]['USER_ID'][] = $rec->user_id;
$lines[$lineNum]['USERNAME'][] = $rec->username;
$lines[$lineNum]['USER_FULL_NAME'][] = $rec->user_full_name;
$lines[$lineNum]['TITLE'][] = $rec->title;
$lines[$lineNum]['IP'][] = $rec->ip;
$lines[$lineNum]['BROWSER'][] = $rec->browser;
$lines[$lineNum]['OPSYS'][] = $rec->opsys;
$lines[$lineNum]['TRANSACTION_ID'][] = $rec->paypal_tx_id;
$lines[$lineNum]['DATE'][] = $rec->paypal_payment_date;
$lines[$lineNum]['TEST_ACCOUNT'][] = $rec->paypal_testaccount;
$lines[$lineNum]['DOWNLOAD_TRIES'][] = $rec->paypal_download_tries;
Furthermore, since you want to exclude some form fields, here is how you can achieve that.
Around line 2587 in this piece of code:
foreach ($element_fields As $element_field) {
if (!isset($fields[strip_tags($element_field->name)])) {
$field_key = md5(strip_tags($element_field->name));
$fields[$field_key] = true;
$head_keys[$field_key] = strip_tags($element_field->name);
}
}
you need to add an if statement like this:
foreach ($element_fields As $element_field) {
if (!isset($fields[strip_tags($element_field->name)])) {
$field_key = md5(strip_tags($element_field->name));
if(strip_tags($element_field->name) != 'field1' && strip_tags($element_field->name) != 'field2') {
$fields[$field_key] = true;
$head_keys[$field_key] = strip_tags($element_field->name); }
}
}
This is an example code, if you do not wish to include fields from your form named 'field1' and 'field2'. Replace those values with the names of your form elements that you DO NOT want to have in the csv export.
That will remove the headers.
To remove the values from this fields as well around line 2665 in this if statement:
if ($sub->name != 'bfFakeName' && $sub->name != 'bfFakeName2' && $sub->name != 'bfFakeName3' && $sub->name != 'bfFakeName4')
add more conditions like this:
if ($sub->name != 'bfFakeName' && $sub->name != 'bfFakeName2' && $sub->name != 'bfFakeName3' && $sub->name != 'bfFakeName4' && $sub->name != 'field1' && $sub->name != 'field2')
NOTE: This will affect all exports from all your forms. The fields with that names won't be included in any export in Manage Records.
This is a sort of custom solution so managing this to work only for one wanted export would require additional coding which is out of scope of our support.
I hope that this will help.
Please before doing the changes backup the
recordmanagment.class.phpfile, for example save it as
OLD_recordmanagment.class.php.
Let me know whether you've managed to achieve what you wanted and apply this to your form.
Regards,
Mihaela