public function build($id = '', $action = '', $async = false, $fileUpload = false)
    {
        // Add extra attributes
        $this->attr('id', $id);
        $this->attr('method', 'post');
        $this->attr('action', $action);
        $this->attr('async', $async);

        // Set form for file upload
        if ($fileUpload) {
            $this->attr('enctype', 'multipart/form-data');
        }

        return $this;
    }
public function build($id = '', $action = '', $async = false, $fileUpload = false)
    {
        // Add extra attributes
        $this->attr('id', $id);
        $this->attr('method', 'post');
        $this->attr('action', $action);
        $this->attr('async', $async);

        // Set form for file upload
        if ($fileUpload) {
            $this->attr('enctype', 'multipart/form-data');
        }

        return $this;
    }
public function build ( $ id = '' , $ action = '' , $ async = false , $ fileUpload = false ) { // Add extra attributes $ this -> attr ( 'id' , $ id ) ; $ this -> attr ( 'method' , 'post' ) ; $ this -> attr ( 'action' , $ action ) ; $ this -> attr ( 'async' , $ async ) ; // Set form for file upload if ( $ fileUpload ) { $ this -> attr ( 'enctype' , 'multipart/form-data' ) ; } return $ this ; }
Build the element.

@param string $id         The form id.
@param string $action     The form action url string.
@param bool   $async      Sets the async attribute for simple forms.
@param bool   $fileUpload This marks the form ready for file upload. It adds the enctype attribute where no
characters are encoded. This value is required when you are using forms that have a
file upload control.

@return $this
@throws Exception
Build the element .