Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takashi Kitajima

    (@inc2734)

    Each form element is created by extending the MW_Form_Field class.
    There are real each form element in MW_Form class but there are not input=”tel” in MW_Form class. So you need to create your own.

    For example :

    function add_tel_field() {
        include_once ' ./form_field_tel.php;
        new Form_Field_Tel();
    }
    add_action( 'plugins_loaded', 'add_tel_field' );
    
    * field_tel.php
    class Form_Field_Tel extends MW_Form_Field {
        ...
        protected function inputPage() {
            ...
            return sprintf( '<input type="tel" name="%s" value="%s" />, ... )
        }
        ...
    }

    Thread Starter Fumito MIZUNO

    (@php-web)

    Thanks, Takashi.

    I will extend MW_Form_Field class.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTML5 attributes’ is closed to new replies.