From e3e32378e9c75303d32c7c7af92852884f73afa0 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 24 Aug 2010 15:53:45 -0300 Subject: Using radio buttons for field and subfield selection on apps --- apps/subfield.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'apps/subfield.php') diff --git a/apps/subfield.php b/apps/subfield.php index 919e0b6..dac04d4 100644 --- a/apps/subfield.php +++ b/apps/subfield.php @@ -11,19 +11,20 @@ $entry = CinisisHttpHelper::getNumericArg('entry'); $fid = CinisisHttpHelper::getNumericArg('fid'); $sid = CinisisHttpHelper::getTextualArg('sid'); -// Draw the document. -$display = new CinisisDisplayHelper('Subfield finder'); -$form = $display->formInputText('entry', $entry); -$form .= $display->formInputText('fid', $fid); -$form .= $display->formInputText('sid', $sid); -$script = basename(__FILE__); -$display->form($form, $script); - // Get a db instance. $isis = new IsisFinder(); -// Setup database and entry number. if ($isis) { + // Draw the document. + $display = new CinisisDisplayHelper('Subfield finder'); + $form = $display->formInputText('entry', $entry); + $form .= $display->radios('fid', $isis->getFieldNames(), $fid); + $form .= $display->radios('sid', $isis->getSubFieldNames($fid), $sid); + //$form .= $display->formInputText('fid', $fid); + //$form .= $display->formInputText('sid', $sid); + $script = basename(__FILE__); + $display->form($form, $script); + // Query database. $field = $isis->getFieldArray($fid); $subfield = $isis->getSubfieldName($fid, $sid); -- cgit v1.2.3