コード例 #1
0
 public function render()
 {
     $this->attributes['type'] = 'url';
     // URL type
     $this->validation[] = new \PFBC\Validation\Url();
     parent::render();
 }
コード例 #2
0
 public function render()
 {
     $this->attributes['type'] = 'number';
     // Number Type
     $this->validation[] = new \PFBC\Validation\Numeric();
     parent::render();
 }
コード例 #3
0
 public function render()
 {
     $this->_attributes["pattern"] = "#[a-g0-9]{6}";
     $this->_attributes["title"] = "6-digit hexidecimal color (e.g. #000000)";
     $this->validation[] = new \PFBC\Validation\RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must contain a " . $this->_attributes["title"]);
     parent::render();
 }
コード例 #4
0
ファイル: Email.php プロジェクト: joswilson/NotJustOK
 public function render()
 {
     $this->attributes['type'] = 'email';
     // Email Type
     $this->validation[] = new \PFBC\Validation\Email();
     parent::render();
     echo '<script src="' . (new \PFBC\Form())->getResourcesPath() . PH7_SH . PH7_JS . 'jquery/mailcheck.js"></script><script src=' . PH7_RELATIVE . 'asset/js/mailcheck.js></script>';
 }
コード例 #5
0
ファイル: Search.php プロジェクト: joswilson/NotJustOK
 public function render()
 {
     $this->attributes['type'] = 'search';
     // Search type
     $this->attributes['x-webkit-speech'] = 'x-webkit-speech';
     // Voice search (only for Webkit engine)
     parent::render();
 }
コード例 #6
0
 public function render()
 {
     $this->validation[] = new \PFBC\Validation\Date();
     parent::render();
 }
コード例 #7
0
ファイル: Week.php プロジェクト: Trieg/php-form-builder-class
 public function render()
 {
     $this->validation[] = new \PFBC\Validation\RegExp("/" . $this->_attributes["pattern"] . "/", "Error: The %element% field must match the following date format: " . $this->_attributes["title"]);
     parent::render();
 }
コード例 #8
0
 public function render()
 {
     $this->attributes['type'] = 'search';
     // Search type
     parent::render();
 }