diff options
Diffstat (limited to 'src/usr/local/www/classes/Form.class.php')
-rw-r--r-- | src/usr/local/www/classes/Form.class.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/usr/local/www/classes/Form.class.php b/src/usr/local/www/classes/Form.class.php index 7964d12..6f30f69 100644 --- a/src/usr/local/www/classes/Form.class.php +++ b/src/usr/local/www/classes/Form.class.php @@ -35,8 +35,6 @@ class Form extends Form_Element protected $_attributes = array( 'class' => array('form-horizontal' => true), 'method' => 'post', - // Empty is interpreted by all browsers to submit to the current URI - 'action' => '', ); protected $_sections = array(); protected $_global = array(); @@ -54,6 +52,9 @@ class Form extends Form_Element if (false !== $submit) $this->addGlobal($submit); + + if (!isset($this->_attributes['action'])) + $this->_attributes['action'] = htmlspecialchars($_SERVER['REQUEST_URI']); } public function add(Form_Section $section) |