Removing a line from the details page

nassausky

Member
Somebody probably did this already but I haven't had any luck finding it in this forum. Which file in the dadabik installation v4.2 displays the Details page of the record and more specifically where inside the file can I add some conditional logic that skips displaying a field and it's data if the field is blank.


Thanks everyone :)
Mike
 

nassausky

Member
OK got it. Seems they've been quite a few people looking to do this but there was no solid answers.

The solution was inside the business_logic.php file in the includes directory.

I got a bunch of custom code in that file so on my file it's around line 3326 which starts like this:

$details_table .= "<tr><td class=\"td_label_details\"><b>".$fields_labels_ar[$i]["label_field"]."</b></td><td class=\"td_value_details\">";


If we enclose that line with an if statement as so:
if (strlen($field_values_ar[0])>0){
$details_table .= "<tr><td class=\"td_label_details\"><b>".$fields_labels_ar[$i]["label_field"]."</b></td><td class=\"td_value_details\">";

}

It does the trick I was looking for. No sense in filling up the details page with extra fields with blank values that we aren't using :)

Now I have to check the posts and get rid of the NULL checkbox during record insertion because that doesnt seem to be doing anything....
 
Top