Source for file jFormsControlRadiobuttons.class.php

Documentation is available at jFormsControlRadiobuttons.class.php

  1. <?php
  2. /**
  3. * @package     jelix
  4. * @subpackage  forms
  5. * @author      Laurent Jouanneau
  6. * @contributor
  7. * @copyright   2006-2008 Laurent Jouanneau
  8. * @link        http://www.jelix.org
  9. * @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
  10. */
  11.  
  12. /**
  13.  * control which contains several radio buttons
  14.  * @package     jelix
  15.  * @subpackage  forms
  16.  */
  17. class jFormsControlRadiobuttons extends jFormsControlDatasource {
  18.     public $type="radiobuttons";
  19.     public $defaultValue='';
  20.     function check(){
  21.         if($this->container->data[$this->ref] == '' && $this->required) {
  22.             return $this->container->errors[$this->ref] = jForms::ERRDATA_REQUIRED;
  23.         }
  24.         return null;
  25.     }
  26. }

Documentation generated on Thu, 22 Mar 2012 22:16:01 +0100 by phpDocumentor 1.4.3