[EP-tech] Re: Checkboxes
Ian Stuart
Ian.Stuart at ed.ac.uk
Mon Jul 14 10:59:38 BST 2014
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,
EDINA,
The University of Edinburgh.
http://edina.ac.uk/
This email was sent via the University of Edinburgh.
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Eprints-tech
mailing list