fuel/fuel/core/classes/form/instance.php
public function open($attributes = array(), array $hidden = array())
	{
		$attributes = ! is_array($attributes) ? array('action' => $attributes) : $attributes;

		// If there is still no action set, Form-post
		if( ! array_key_exists('action', $attributes) or empty($attributes['action']))
		{
			$attributes['action'] = \Uri::main();
		}

		// If not a full URL, create one
		elseif ( ! strpos($attributes['action'], '://'))
		{
			$attributes['action'] = \Uri::create($attributes['action']);
		}

		if (empty($attributes['accept-charset']))
		{
			$attributes['accept-charset'] = strtolower(\Fuel::$encoding);
		}

		// If method is empty, use POST
		! empty($attributes['method']) || $attributes['method'] = $this->get_config('form_method', 'post');

		$form = '<form';
		foreach ($attributes as $prop => $value)
		{
			$form .= ' '.$prop.'="'.$value.'"';
		}
		$form .= '>';

		// Add hidden fields when given
		foreach ($hidden as $field => $value)
		{
			$form .= PHP_EOL.$this->hidden($field, $value);
		}

		return $form;
	}
public function open($attributes = array(), array $hidden = array())
	{
		$attributes = ! is_array($attributes) ? array('action' => $attributes) : $attributes;

		// If there is still no action set, Form-post
		if( ! array_key_exists('action', $attributes) or empty($attributes['action']))
		{
			$attributes['action'] = \Uri::main();
		}

		// If not a full URL, create one
		elseif ( ! strpos($attributes['action'], '://'))
		{
			$attributes['action'] = \Uri::create($attributes['action']);
		}

		if (empty($attributes['accept-charset']))
		{
			$attributes['accept-charset'] = strtolower(\Fuel::$encoding);
		}

		// If method is empty, use POST
		! empty($attributes['method']) || $attributes['method'] = $this->get_config('form_method', 'post');

		$form = '<form';
		foreach ($attributes as $prop => $value)
		{
			$form .= ' '.$prop.'="'.$value.'"';
		}
		$form .= '>';

		// Add hidden fields when given
		foreach ($hidden as $field => $value)
		{
			$form .= PHP_EOL.$this->hidden($field, $value);
		}

		return $form;
	}
public function open ( $ attributes = array ( ) , array $ hidden = array ( ) ) { $ attributes = ! is_array ( $ attributes ) ? array ( 'action' => $ attributes ) : $ attributes ; // If there is still no action set, Form-post if ( ! array_key_exists ( 'action' , $ attributes ) or empty ( $ attributes [ 'action' ] ) ) { $ attributes [ 'action' ] = \ Uri :: main ( ) ; } // If not a full URL, create one elseif ( ! strpos ( $ attributes [ 'action' ] , '://' ) ) { $ attributes [ 'action' ] = \ Uri :: create ( $ attributes [ 'action' ] ) ; } if ( empty ( $ attributes [ 'accept-charset' ] ) ) { $ attributes [ 'accept-charset' ] = strtolower ( \ Fuel :: $ encoding ) ; } // If method is empty, use POST ! empty ( $ attributes [ 'method' ] ) || $ attributes [ 'method' ] = $ this -> get_config ( 'form_method' , 'post' ) ; $ form = '<form' ; foreach ( $ attributes as $ prop => $ value ) { $ form .= ' ' . $ prop . '="' . $ value . '"' ; } $ form .= '>' ; // Add hidden fields when given foreach ( $ hidden as $ field => $ value ) { $ form .= PHP_EOL . $ this -> hidden ( $ field , $ value ) ; } return $ form ; }
Create a form open tag

@param   string|array  action string or array with more tag attribute settings
@return  string
Create a form open tag