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

Documentation generated on Wed, 24 Sep 2014 21:59:45 +0200 by phpDocumentor 1.4.3