form::open PHP Method

open() public static method

public static open ( $action, $method = 'POST', $attributes = [] )
    public static function open($action, $method = 'POST', $attributes = array())
    {
        $attributes['method'] = static::method(strtoupper($method));
        $attributes['action'] = static::action($action);
        if (!array_key_exists('accept-charset', $attributes)) {
            $attributes['accept-charset'] = Config::app('encoding');
        }
        return '<form' . Html::attributes($attributes) . '>';
    }

Usage Example

Exemplo n.º 1
0
 public function edit($url)
 {
     $display_name = ucwords(str_replace('_', ' ', $url));
     $this->__set_heading("Editing Theme file - " . $display_name);
     $view = new View('zest/content');
     $content = form::open('admin/snippets/save/' . $url);
     $html = zest::template_to_html(THEME_PATH . $url);
     $content .= form::label('content', 'Code');
     $content .= '<p><small>This is only for advanced users. To edit <a onclick="$(\'#content\').toggle();return false;" href="#">click here</a></small></p>';
     $content .= form::textarea('content', $html, 'id="content" class="fullWidth no-editor hside"');
     $content .= form::submit('submit', 'Save', 'class="submit"');
     $content .= form::close();
     $view->content = $content;
     $this->__set_content($view);
 }
All Usage Examples Of form::open