Martijn - 2004-07-07

I noticed that if I have a non-required, linked field
to another table, it's not possible for the user to
select an 'empty' value.

I also fixed it already, here's how:

In main_classes/Field.php change this part:

$count = 0;
while ($rowinfo =
$result->fetchRow(DB_FETCHMODE_ASSOC)) {
$this->comboval[$count] = $rowinfo[$dbcombofieldval];
$this->combodisp[$count] = $rowinfo[$dbcombofielddisp];
$count++;
}
}

to this:

$count = 0;
if (!($this->required)) {
$this->comboval[$count] = "0";
$this->combodisp[$count] = "(empty)";
$count++;
}
while ($rowinfo =
$result->fetchRow(DB_FETCHMODE_ASSOC)) {
$this->comboval[$count] = $rowinfo[$dbcombofieldval];
$this->combodisp[$count] = $rowinfo[$dbcombofielddisp];
$count++;
}
}