[EP-tech] Re: Checkboxes

Sebastien Francois sf2 at ecs.soton.ac.uk
Thu Jul 17 16:32:48 BST 2014


Hi Andrew,

I do not know the name of your field, or its type, I'll assume
"FIELDNAME" and that it's a boolean (so it takes values: TRUE, FALSE or
undef)

$data->{FIELDNAME} = "FALSE"; # for "no"

So when EPrints creates a new "eprint" object, it starts with the hash
$data and populates it with default values. The line above adds such a
default value. The object is then created in the DB.

Seb.

On 17/07/14 15:26, Andrew Beeken wrote:
> Hi Seb,
>
> What syntax do I use in the default.pl file - it’s not entirely clear from
> my end?
>
> Andrew
>



More information about the Eprints-tech mailing list