summaryrefslogtreecommitdiff
path: root/modules/forge/libraries/Forge.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forge/libraries/Forge.php')
-rw-r--r--modules/forge/libraries/Forge.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/forge/libraries/Forge.php b/modules/forge/libraries/Forge.php
index 04b3640a..f6bca42b 100644
--- a/modules/forge/libraries/Forge.php
+++ b/modules/forge/libraries/Forge.php
@@ -283,11 +283,17 @@ class Forge_Core {
$form_type = 'open';
// See if we need a multipart form
- foreach ($this->inputs as $input)
- {
- if ($input instanceof Form_Upload)
- {
- $form_type = 'open_multipart';
+ $check_inputs = array($this->inputs);
+ while ($check_inputs) {
+ foreach (array_shift($check_inputs) as $input) {
+ if ($input instanceof Form_Upload)
+ {
+ $form_type = 'open_multipart';
+ }
+ if ($input instanceof Form_Group)
+ {
+ $check_inputs += array($input->inputs);
+ }
}
}
@@ -310,4 +316,4 @@ class Forge_Core {
return (string) $this->render();
}
-} // End Forge \ No newline at end of file
+} // End Forge