[EP-tech] Re: Checkboxes

Andrew Beeken anbeeken at lincoln.ac.uk
Mon Jul 14 15:36:51 BST 2014

Ah right - I¹ve actually achieved this now with a Yes/No drop down,
however I¹ve come across another funny; the drop down is showing a third
value of UNSPECIFIED - I¹d like it to default to No but I can¹t seem to
find the correct setting for that or where to put it.

On 14/07/2014 10:59, "Ian Stuart" <Ian.Stuart at ed.ac.uk> wrote:

>On 14/07/14 10:46, Andrew Beeken wrote:
>> Hello! I¹m wondering if I¹m missing something but I can¹t seem to
>> find the correct type definition for adding a checkbox field to
>> EPrints. Any pointers?
>I couldn't make a list of checkboxes from a single hash/list
>The is what I do:
>     foreach
>         my $card ( sort { $a->get_value('email') cmp
>$b->get_value('email') }
>       @postcards )
>     {
>       my $div   = $session->make_element('div');
>       my $label = $session->make_element('label');
>       $div->appendChild($label);
>       my $input = $session->render_input_field(
>         type     => 'radio',
>         name     => 'rjb_email',
>         value    => $card->get_value('email'),
>         class    => 'ep_form_checkbox',
>         onChange => 'autoSubmitEmail();'
>       );
>       $label->appendChild($input);
>       $label->appendChild(
>         $session->make_text(
>                 q{ }
>               . $card->get_value('email')
>               . ' (watching '
>               . scalar @{ $card->get_value('repos') }
>               . ' repositories) '
>         )
>       );
>Does that help?
>Ian Stuart.
>Developer: ORI, RJ-Broker, and OpenDepot.org
>Bibliographics and Multimedia Service Delivery team,
>The University of Edinburgh.
>This email was sent via the University of Edinburgh.
>The University of Edinburgh is a charitable body, registered in
>Scotland, with registration number SC005336.
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/

The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research.

The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies.

Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions.

The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://www.lincoln.ac.uk/legal.

More information about the Eprints-tech mailing list