Hi
i need some adapting to chech for empty fields to my lines. asking for help as i ain't a php programmer and need some fast tweaking.
my code lines are
<?php
foreach ($this->item->extra_fields as $key=>$extraField):
switch ($extraField->id) {
case 11:
$textfield = $extraField->value;
break;
case 12:
$textarea = $extraField->value;
break;
case 13:
$link = $extraField->value;
break;
}
endforeach;
?>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $textfield; ?>
</div>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $textarea; ?>
</div>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $link; ?>
</div>
before it prints the output for each of the cases textfield, textarea and link, i need k2 to check if the fields are empty and only print the results if the fields are filled.
i've found some stuff on this empty thing but i amgetting errors cause i ain't that good at adapting the stuff to my code. so, i'd appreciate some help here.
i need some adapting to chech for empty fields to my lines. asking for help as i ain't a php programmer and need some fast tweaking.
my code lines are
<?php
foreach ($this->item->extra_fields as $key=>$extraField):
switch ($extraField->id) {
case 11:
$textfield = $extraField->value;
break;
case 12:
$textarea = $extraField->value;
break;
case 13:
$link = $extraField->value;
break;
}
endforeach;
?>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $textfield; ?>
</div>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $textarea; ?>
</div>
<div style="width: 150px; float: left; background-color:#FF6;">
<?php echo $link; ?>
</div>
before it prints the output for each of the cases textfield, textarea and link, i need k2 to check if the fields are empty and only print the results if the fields are filled.
i've found some stuff on this empty thing but i amgetting errors cause i ain't that good at adapting the stuff to my code. so, i'd appreciate some help here.