EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03290


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Checkboxes


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
>