diff options
author | Evan Prodromou <evan@status.net> | 2009-11-18 09:20:31 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-18 09:20:31 -0500 |
commit | fa35dab2265aba78f7c704c34eaef4100bddfd70 (patch) | |
tree | d12a78861162672e87e0c1330133d09aff651009 /lib | |
parent | 1cc10aaef63830ead662d8a962373554a949c951 (diff) | |
parent | 007418fdab8f9f0c718a18568bfbf4377bb85364 (diff) |
Merge branch '0.9.x' into mapstraction
Diffstat (limited to 'lib')
-rw-r--r-- | lib/form.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/form.php b/lib/form.php index 87b7a5cba..868c986b9 100644 --- a/lib/form.php +++ b/lib/form.php @@ -67,7 +67,7 @@ class Form extends Widget { $attributes = array('id' => $this->id(), 'class' => $this->formClass(), - 'method' => 'post', + 'method' => $this->method(), 'action' => $this->action()); if (!empty($this->enctype)) { @@ -120,6 +120,18 @@ class Form extends Widget } /** + * HTTP method used to submit the form + * + * Defaults to post. Subclasses can override if they need to. + * + * @return string the method to use for submitting + */ + function method() + { + return 'post'; + } + + /** * Buttons for form actions * * Submit and cancel buttons (or whatever) |