summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/form.php14
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)