当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_QuickForm::addGroup方法代码示例

本文整理汇总了PHP中HTML_QuickForm::addGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm::addGroup方法的具体用法?PHP HTML_QuickForm::addGroup怎么用?PHP HTML_QuickForm::addGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_QuickForm的用法示例。


在下文中一共展示了HTML_QuickForm::addGroup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $options = array('format' => 'd m Y H i', 'optionIncrement' => array('i' => 15), 'minYear' => date('Y') - 2, 'maxYear' => date('Y') + 2);
     $form = new HTML_QuickForm('protokol', 'POST', $this->url());
     $form->addElement('hidden', 'elev_id');
     $form->addElement('hidden', 'id');
     $form->addElement('date', 'date_start', 'Startdato:', $options);
     $form->addElement('date', 'date_end', 'Slutdato:', $options);
     $radio[0] =& HTML_QuickForm::createElement('radio', null, null, 'fri', '1');
     $radio[1] =& HTML_QuickForm::createElement('radio', null, null, 'syg', '2');
     $radio[2] =& HTML_QuickForm::createElement('radio', null, null, 'fraværende', '3');
     $radio[5] =& HTML_QuickForm::createElement('radio', null, null, 'henstilling', '6');
     $radio[3] =& HTML_QuickForm::createElement('radio', null, null, 'mundtlig advarsel', '4');
     $radio[4] =& HTML_QuickForm::createElement('radio', null, null, 'skriftlig advarsel', '5');
     $radio[6] =& HTML_QuickForm::createElement('radio', null, null, 'hjemsendt', '7');
     $radio[7] =& HTML_QuickForm::createElement('radio', null, null, 'andet', '8');
     $form->addGroup($radio, 'type', 'Type:', ' ');
     $form->addElement('textarea', 'text', '');
     $form->addElement('submit', null, 'Send');
     $form->addRule('date_start', 'Husk dato', 'required', null, 'client');
     $form->addRule('date_end', 'Husk dato', 'required', null, 'client');
     $form->addRule('type', 'Husk type', 'required', null, 'client');
     $form->addRule('text', 'Tekst', 'required', null, 'client');
     return $this->form = $form;
 }
开发者ID:vih,项目名称:intranet.vih.dk,代码行数:28,代码来源:Item.php

示例2: __construct

 public function __construct()
 {
     parent::__construct('delete_interest', 'Delete Interest', 'Admin/delete_interest.php');
     if ($this->loginError) {
         return;
     }
     $form = new HTML_QuickForm('deleter');
     $interest_list = new pdAuthInterests($this->db);
     $form->addElement('select', 'interests', 'Select interest(s) to delete:', $interest_list->list, array('multiple' => 'multiple', 'size' => 15));
     $form->addGroup(array(HTML_QuickForm::createElement('button', 'cancel', 'Cancel', array('onclick' => 'history.back()')), HTML_QuickForm::createElement('submit', 'submit', 'Delete')), null, null, ' ', false);
     if ($form->validate()) {
         $values = $form->exportValues();
         foreach ($values['interests'] as $interest_id) {
             $names[] = $interest_list->list[$interest_id];
         }
         $interest_list->dbDelete($this->db, $values['interests']);
         echo 'You have successfully removed the following interest from the ', 'database: <br/><b>', implode(', ', $names), '</b></p>', '<br><a href="', $_SERVER['PHP_SELF'], '">Delete another interest</a>';
     } else {
         $renderer =& $form->defaultRenderer();
         $form->accept($renderer);
         $this->form =& $form;
         $this->renderer =& $renderer;
         echo '<h3>Delete Interest </h3>';
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:25,代码来源:delete_interest.php

示例3: __construct

 public function __construct()
 {
     parent::__construct('authorize_new_users');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars(true, true);
     $this->users = pdUserList::getNotVerified($this->db);
     echo '<h2>Users Requiring Authentication</h2>';
     if ($this->users == null || count($this->users) == 0) {
         echo 'All users authorized.';
         return;
     }
     $form = new HTML_QuickForm('authorizeUsers', 'post');
     foreach ($this->users as $user) {
         $form->addGroup(array(HTML_QuickForm::createElement('advcheckbox', "submit[auth][{$user->login}]", null, null, null, array('no', 'yes')), HTML_QuickForm::createElement('select', "submit[access][{$user->login}]", null, AccessLevel::getAccessLevels()), HTML_QuickForm::createElement('static', null, null, $user->login), HTML_QuickForm::createElement('static', null, null, $user->name), HTML_QuickForm::createElement('static', null, null, $user->email)), 'all', null, '</td><td class="stats_odd">', false);
     }
     $form->addElement('submit', null, 'Submit');
     $this->form =& $form;
     if ($form->validate()) {
         $this->processForm();
     } else {
         $this->renderForm();
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:25,代码来源:authorize_new_users.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->loginError) {
         return;
     }
     $this->use_mootools = true;
     $this->pub =& $_SESSION['pub'];
     if (isset($this->pub->pub_id)) {
         $this->page_title = 'Edit Publication';
     }
     // initialize attachments
     if (!isset($_SESSION['paper']) && !isset($_SESSION['attachments'])) {
         $_SESSION['paper'] = $this->pub->paperFilenameGet();
         if (count($this->pub->additional_info) > 0) {
             for ($i = 0, $n = count($this->pub->additional_info); $i < $n; $i++) {
                 $_SESSION['attachments'][$i] = $this->pub->attFilenameGet($i);
                 $_SESSION['att_types'][$i] = $this->pub->additional_info[$i]->type;
             }
         }
     }
     $form = new HTML_QuickForm('add_pub4');
     $this->form =& $form;
     $this->formAddAttachments();
     $this->formAddWebLinks();
     $this->formRelatedPubs();
     $pos = strpos($_SERVER['PHP_SELF'], 'papersdb');
     $url = substr($_SERVER['PHP_SELF'], 0, $pos) . 'papersdb';
     $form->addGroup(array(HTML_QuickForm::createElement('submit', 'prev_step', '<< Previous Step'), HTML_QuickForm::createElement('button', 'cancel', 'Cancel', array('onclick' => "cancelConfirm();")), HTML_QuickForm::createElement('reset', 'reset', 'Reset'), HTML_QuickForm::createElement('submit', 'finish', 'Finish')), 'buttons', null, '&nbsp;', false);
     if ($form->validate()) {
         $this->processForm();
     } else {
         $this->renderForm();
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:35,代码来源:add_pub4.php

示例5: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $faggruppe = VIH_Model_Fag_Gruppe::getList();
     foreach ($faggruppe as $grp) {
         $faggruppelist[$grp->get('id')] = $grp->get('navn');
     }
     $undervisere = VIH_Model_Ansat::getList('lærere');
     $form = new HTML_QuickForm('fag', 'POST', $this->url());
     $form->addElement('hidden', 'id');
     $form->addElement('text', 'navn', 'Navn');
     $form->addElement('select', 'faggruppe_id', 'Faggruppe', $faggruppelist);
     $form->addElement('text', 'identifier', 'Identifier');
     $form->addElement('textarea', 'kort_beskrivelse', 'Kort beskrivelse', array('cols' => 80, 'rows' => 5));
     $form->addElement('textarea', 'beskrivelse', 'Beskrivelse', array('cols' => 80, 'rows' => 20));
     $form->addElement('textarea', 'udvidet_beskrivelse', 'Udvidet beskrivelse', array('cols' => 80, 'rows' => 20));
     $form->addElement('header', null, 'Til søgemaskinerne');
     $form->addElement('text', 'title', 'Titel');
     $form->addElement('textarea', 'description', 'Beskrivelse');
     $form->addElement('textarea', 'keywords', 'Nøgleord');
     $underviserlist = array();
     foreach ($undervisere as $underviser) {
         $underviserlist[] = HTML_QuickForm::createElement('checkbox', $underviser->get('id'), null, $underviser->get('navn'));
     }
     $form->addGroup($underviserlist, 'underviser', 'Underviser', '<br />');
     $form->addElement('checkbox', 'published', 'Udgivet');
     $form->addElement('submit', null, 'Gem');
     return $this->form = $form;
 }
开发者ID:vih,项目名称:intranet.vih.dk,代码行数:31,代码来源:Edit.php

示例6: __construct

    public function __construct()
    {
        parent::__construct();
        if ($this->loginError) {
            return;
        }
        $this->use_mootools = true;
        $this->pub =& $_SESSION['pub'];
        if (isset($this->pub->pub_id)) {
            $this->page_title = 'Edit Publication';
        }
        $this->authors = pdAuthorList::create($this->db, null, null, true);
        $form = new HTML_QuickForm('add_pub2', 'post', '', '', array('onsubmit' => 'return check_authors("add_pub2");'));
        $form->addElement('header', null, 'Select from Authors in Database');
        $tooltip = 'Authors::The authors of the publication. Listed in the
same order as in the publication
&lt;p/&gt;
If an author is not already in the database press the &lt;b&gt;Add Author not
in DB&lt;/b&gt; button.';
        $form->addElement('textarea', 'authors', "<div id=\"MYCUSTOMFLOATER\"  class=\"myCustomFloater\" style=\"position:absolute;top:200px;left:600px;background-color:#cecece;display:none;visibility:hidden\"><div class=\"myCustomFloaterContent\"></div></div>" . "<span class=\"Tips1\" title=\"{$tooltip}\">Authors</span>:", array('cols' => 60, 'rows' => 5, 'class' => 'wickEnabled:MYCUSTOMFLOATER', 'wrap' => 'virtual'));
        $form->addElement('static', null, null, '<span class="small">' . 'There are ' . count($this->authors) . ' authors in the database. Type a partial name to ' . 'see a list of matching authors. Separate names ' . 'using commas.</span>');
        $form->addElement('submit', 'add_new_author', 'Add Author not in DB');
        // collaborations radio selections
        $tooltip = 'Collaborations::If the publication is a collaboration,
select the options that apply to this paper.';
        $form->addElement('header', null, "<span class=\"Tips1\" title=\"{$tooltip}\">Collaborations</span>");
        $collaborations = pdPublication::collaborationsGet($this->db);
        foreach ($collaborations as $col_id => $description) {
            $radio_cols[] = HTML_QuickForm::createElement('checkbox', 'paper_col[' . $col_id . ']', null, $description, 1);
        }
        $form->addGroup($radio_cols, 'group_collaboration', null, '<br/>', false);
        $pos = strpos($_SERVER['PHP_SELF'], 'papersdb');
        $url = substr($_SERVER['PHP_SELF'], 0, $pos) . 'papersdb';
        $buttons[] = HTML_QuickForm::createElement('submit', 'prev_step', '<< Previous Step');
        $buttons[] = HTML_QuickForm::createElement('button', 'cancel', 'Cancel', array('onclick' => "cancelConfirm();"));
        $buttons[] = HTML_QuickForm::createElement('submit', 'next_step', 'Next Step >>');
        if ($this->pub->pub_id != '') {
            $buttons[] = HTML_QuickForm::createElement('submit', 'finish', 'Finish');
        }
        $form->addGroup($buttons, 'buttons', '', '&nbsp;', false);
        $this->form =& $form;
        if ($form->validate()) {
            $this->processForm();
        } else {
            $this->renderForm();
        }
    }
开发者ID:papersdb,项目名称:papersdb,代码行数:47,代码来源:add_pub2.php

示例7: otherFormatForm

 /**
  *
  */
 public function otherFormatForm($result_pubs)
 {
     if ($result_pubs == null) {
         return;
     }
     $form = new HTML_QuickForm('otherFormatForm');
     $form->addElement('hidden', 'pub_ids', implode(",", $result_pubs));
     $form->addGroup(array(HTML_QuickForm::createElement('submit', 'cv_format', 'Show results in CV format'), HTML_QuickForm::createElement('submit', 'bibtex_format', 'Show results in BibTex format')), null, null, '&nbsp;');
     return $form;
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:13,代码来源:search_results.php

示例8: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $form = new HTML_QuickForm('', 'post', $this->url());
     $form->addElement('text', 'email', 'E-mail');
     $radio[0] =& HTML_QuickForm::createElement('radio', null, null, 'tilmeld', '1');
     $radio[1] =& HTML_QuickForm::createElement('radio', null, null, 'frameld', '2');
     $form->addGroup($radio, 'mode', null, null);
     $form->addElement('submit', null, 'Gem');
     $form->setDefaults(array('mode' => 1));
     $form->addRule('email', 'Du skal skrive en e-mail-adresse', 'required', null);
     return $this->form = $form;
 }
开发者ID:vih,项目名称:kursuscenter.vih.dk,代码行数:15,代码来源:index.php

示例9: __construct

 public function __construct()
 {
     parent::__construct('view_publication', 'View Publication', 'view_publication.php');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars();
     if (!isset($this->pub_id) || !is_numeric($this->pub_id)) {
         $this->pageError = true;
         return;
     }
     $pub = new pdPublication();
     $result = $pub->dbLoad($this->db, $this->pub_id);
     if (!$result) {
         echo 'Publication does not exist';
         return;
     }
     if (isset($this->submit_pending) && $this->submit_pending) {
         // check if this pub entry is pending
         $q = $this->db->selectRow('pub_pending', '*', array('pub_id' => $this->pub_id));
         assert('$q');
         $form = new HTML_QuickForm('submit_pending');
         $form->addElement('hidden', 'submit_pending', true);
         $form->addElement('hidden', 'pub_id', $this->pub_id);
         $elements = array();
         $elements[] = HTML_QuickForm::createElement('advcheckbox', 'valid', null, 'Valid', null, array(0, 1));
         $elements[] = HTML_QuickForm::createElement('submit', 'submit', 'Submit');
         $form->addGroup($elements, 'elgroup', '', '&nbsp', false);
         // create a new renderer because $form->defaultRenderer() creates
         // a single copy
         $renderer = new HTML_QuickForm_Renderer_Default();
         $form->accept($renderer);
         if ($form->validate()) {
             $values =& $form->exportValues();
             $pub->markValid($this->db);
             echo 'Publication entry marked as valid.';
             return;
         } else {
             echo "<h2>This publication entry requires validation</h2>\n";
             echo $renderer->toHtml();
         }
     }
     $this->showPublication($pub);
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:44,代码来源:view_publication.php

示例10: __construct

 public function __construct()
 {
     parent::__construct('tag_non_ml');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars();
     $pubs =& $this->getNonMachineLearningPapers();
     $form = new HTML_QuickForm('tag_non_ml_form', 'post', './tag_ml_submit.php');
     $form->addElement('header', null, 'Citation</th><th style="width:7%">Is ML');
     $count = 0;
     foreach ($pubs as &$pub) {
         $pub->dbLoad($this->db, $pub->pub_id, pdPublication::DB_LOAD_VENUE | pdPublication::DB_LOAD_CATEGORY | pdPublication::DB_LOAD_AUTHOR_FULL);
         ++$count;
         $form->addGroup(array(HTML_QuickForm::createElement('static', null, null, $pub->getCitationHtml() . '&nbsp;' . getPubIcons($this->db, $pub, 0x7)), HTML_QuickForm::createElement('advcheckbox', 'pub_tag[' . $pub->pub_id . ']', null, null, null, array('no', 'yes'))), 'tag_ml_group', $count, '</td><td>', false);
     }
     $form->addElement('submit', 'submit', 'Submit');
     $renderer =& $form->defaultRenderer();
     $form->accept($renderer);
     $this->renderer =& $renderer;
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:21,代码来源:tag_non_ml.php

示例11: array

$form->addElement('header', '', 'Normal Elements');
$form->addElement('hidden', 'ihidTest', 'hiddenField');
$form->addElement('text', 'itxtTest', 'Test Text');
$form->addElement('textarea', 'itxaTest', 'Test TextArea');
// will be later assigned to style green
$form->addElement('password', 'ipwdTest', array('Test Password', 'Please choose a password which is hard to guess'));
$select =& $form->addElement('select', 'iselTest', 'Test Select', array('A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D'));
$select->setSize(5);
$select->setMultiple(true);
$form->addElement('submit', 'isubTest', 'Test Submit');
$form->addElement('header', '', 'Grouped Elements');
$checkbox[] =& HTML_QuickForm::createElement('checkbox', 'A', null, 'A');
$checkbox[] =& HTML_QuickForm::createElement('checkbox', 'B', null, 'B');
$checkbox[] =& HTML_QuickForm::createElement('checkbox', 'C', null, 'C');
$checkbox[] =& HTML_QuickForm::createElement('checkbox', 'D', null, 'D');
$form->addGroup($checkbox, 'ichkABCD', 'ABCD', '<br />');
// will be later assigned to style fancygroup
$radio[] =& HTML_QuickForm::createElement('radio', null, null, 'Yes', 'Y');
$radio[] =& HTML_QuickForm::createElement('radio', null, null, 'No', 'N');
$form->addGroup($radio, 'iradYesNo', 'Yes/No');
// will be later assigned to style fancygroup
$name['first'] =& HTML_QuickForm::createElement('text', 'first', 'First:');
$name['first']->setSize(20);
$name['last'] =& HTML_QuickForm::createElement('text', 'last', 'Last:');
$name['last']->setSize(30);
$form->addGroup($name, 'name', 'Name');
// add some 'required' rules to show "stars" and (possible) errors...
$form->addRule('itxtTest', 'Test Text is a required field', 'required');
$form->addRule('itxaTest', 'Test TextArea is a required field', 'required');
$form->addGroupRule('iradYesNo', 'Check Yes or No', 'required');
$form->addGroupRule('name', array('last' => array(array('Last name is required', 'required'))));
开发者ID:laiello,项目名称:coopcrucial,代码行数:31,代码来源:FlexyDynamic_example.php

示例12: array

 $form->addElement('html', '</fieldset>');
 $form->addElement('html', '<div class="both"></div>');
 // Price
 $form->addElement('html', '<fieldset id="price">');
 $form->addElement('header', 'price_header', 'Price');
 $form->addElement('text', 'price', 'Price:', array('size' => 10, 'maxlength' => 10, 'class' => 'inputbox'));
 $errors[] = 'price';
 if ($ushop->checkout['stock_control']) {
     $form->addElement('text', 'quantity', 'Quantity:', array('size' => 5, 'maxlength' => 5, 'class' => 'inputbox'));
     $form->addRule('quantity', 'quatity has to be a number.', 'numeric');
     $errors[] = 'quantity';
 }
 if ($ushop->checkout['vat_state'] == 1) {
     $group_radio[] = $form->createElement('radio', null, null, 'Yes', '1');
     $group_radio[] = $form->createElement('radio', null, null, 'No', '0');
     $form->addGroup($group_radio, 'vat_inc', 'Include Tax:');
     $errors[] = 'vat_inc';
     $s = $form->createElement('select', 'tax_code_id', 'Tax Code:');
     $opts[0] = 'Select One';
     foreach ($ushop->formatTaxCodes() as $code) {
         $opts[$code['tax_code_id']] = $code['tax_code'];
     }
     $s->loadArray($opts);
     $form->addElement($s);
     $errors[] = 'taxcode_id';
 } else {
     $no_tax = $this->getResult('tax_code_id', $ushop->db_name . 'tax_codes', null, array('where' => "tax_code='N'"));
     $form->addElement('hidden', 'tax_code_id', $no_tax[0]->tax_code_id);
     $form->addElement('hidden', 'vat_inc', 0);
 }
 // price groups.
开发者ID:shaunfreeman,项目名称:Uthando-CMS,代码行数:31,代码来源:new_product.php

示例13: die

// no direct access
defined('PARENT_FILE') or die('Restricted access');
if ($this->authorize()) {
    if (isset($this->registry->params['id'])) {
        $form = new HTML_QuickForm('contentPage', 'post', $_SERVER['REQUEST_URI']);
        // Remove name attribute for xhtml strict compliance.
        $form->removeAttribute('name');
        $form->addElement('html', '<div id="edit_params">');
        $form->addElement('text', 'page', 'Page Title:', array('size' => 50, 'maxlength' => 255, 'class' => 'inputbox'));
        $form->addElement('html', '<fieldset>');
        $form->addElement('header', 'parameters', 'Parameters');
        $params = array('show_title', 'show_cdate', 'show_mdate');
        foreach ($params as $value) {
            $radio_set = array($form->createElement('radio', null, null, 'Yes', '1'), $form->createElement('radio', null, null, 'No', '0'));
            $form->addGroup($radio_set, 'params[' . $value . ']', ucwords(str_replace('_', ' ', $value)) . ':');
        }
        $form->addElement('html', '</fieldset>');
        $form->addElement('html', '<fieldset>');
        $form->addElement('header', 'metadata', 'Metadata');
        $form->addElement('textarea', 'params[metadata][description]', 'Description:');
        $form->addElement('textarea', 'params[metadata][keywords]', 'Keywords:');
        $form->addElement('html', '</fieldset>');
        $form->addElement('html', '</div>');
        $form->addElement('html', '<div id="edit_html">');
        $form->addElement('textarea', 'content', null, array('id' => 'content_textarea', 'class' => 'mceEditor'));
        $form->addElement('html', '</div>');
        $form->addRule('page', 'Please enter a title', 'required');
        if ($form->validate()) {
            // Apply form element filters.
            $form->freeze();
开发者ID:shaunfreeman,项目名称:Uthando-CMS,代码行数:30,代码来源:edit.php

示例14:

 /**
  * Overrides method from parent, append name defaults to false
  * @param    array      $elements       array of elements composing the group
  * @param    string     $name           (optional)group name
  * @param    string     $groupLabel     (optional)group label
  * @param    string     $separator      (optional)string to separate elements
  * @param    string     $appendName     (optional)specify whether the group name should be
  *                                      used in the form element name ex: group[element], defaults to false
  * @return   HTML_QuickForm_group       reference to a newly added group
  * @since    2.8
  * @access   public
  * @throws   HTML_QuickForm_Error
  */
 function &addGroup($elements, $name = null, $groupLabel = '', $separator = null, $appendName = false)
 {
     return parent::addGroup($elements, $name, $groupLabel, $separator, $appendName);
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:17,代码来源:Form.php

示例15: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $tilmelding = VIH_Model_KortKursus_Tilmelding::factory($this->context->name());
     $tilmelding->loadBetaling();
     $forsikringstekst = '';
     if ($tilmelding->get('pris_forsikring') > 0) {
         $forsikringstekst = ' og afbestillingsforsikring';
     }
     $form = new HTML_QuickForm('onlinebetaling', 'POST', $this->url());
     if ($tilmelding->get('skyldig_depositum') > 0 and $tilmelding->get('dato_forfalden') > date('Y-m-d')) {
         $form->addElement('header', null, 'Hvilket beløb vil du betale?');
         $options[] =& HTML_QuickForm::createElement('radio', null, null, $tilmelding->get('pris_total') . ' kroner (DKK) - dækker hele kursusprisen', $tilmelding->get('pris_total') * 100);
         $options[] =& HTML_QuickForm::createElement('radio', null, null, $tilmelding->get('pris_forudbetaling') . ' kroner (DKK) - dækker depositum' . $forsikringstekst, $tilmelding->get('pris_forudbetaling') * 100);
         $form->addGroup($options, 'amount', 'Beløb', '<br />');
         $form->addGroupRule('amount', 'Du skal vælge et beløb', 'required', null);
     } else {
         $form->addElement('header', null, 'Du skal betale nedenstående beløb');
         $form->addElement('radio', 'amount', 'Beløb', $tilmelding->get('skyldig') . ' kroner (DKK) - dækker resten af beløbet', $tilmelding->get('skyldig') * 100);
         $form->addRule('amount', 'Du skal vælge et beløb', 'required');
         $form->addRule('amount', 'Du skal vælge et beløb', 'numeric');
         $form->setDefaults(array('amount' => $tilmelding->get('skyldig') * 100));
     }
     $form->addElement('header', null, 'Betaling');
     $form->addElement('text', 'cardnumber', 'Kortnummer');
     $form->addElement('text', 'cvd', 'Sikkerhedsnummer');
     $form->addElement('text', 'mm', 'Mdr.');
     $form->addElement('text', 'yy', 'år');
     $form->addElement('html', null, 'Vær opmærksom på, at det kan tage helt op til et minut at gennemføre transaktionen hos PBS.');
     $form->addElement('submit', null, 'Betal');
     $form->addRule('cardnumber', 'Du skal skrive et kortnummer', 'required');
     $form->addRule('cardnumber', 'Du skal skrive et kortnummer', 'numeric');
     $form->addRule('cvd', 'Du skal skrive et sikkerhedsnummer', 'required');
     $form->addRule('cvd', 'Du skal skrive et sikkerhedsnummer', 'numeric');
     $form->addRule('mm', 'Du skal udfylde Mdr.', 'required');
     $form->addRule('mm', 'Du skal udfylde Mdr.', 'numeric');
     $form->addRule('yy', 'Du skal udfylde år ', 'required');
     $form->addRule('yy', 'Du skal udfylde år', 'numeric');
     $form->applyFilter('__ALL__', 'trim');
     $form->applyFilter('__ALL__', 'addslashes');
     $form->applyFilter('__ALL__', 'strip_tags');
     return $this->form = $form;
 }
开发者ID:vih,项目名称:vih.dk,代码行数:45,代码来源:OnlineBetaling.php


注:本文中的HTML_QuickForm::addGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。