From 366e03ce112dffd58af44fff1b014f9f4c340a09 Mon Sep 17 00:00:00 2001 From: Hector Cortez Date: Thu, 26 Jul 2012 12:07:29 -0400 Subject: [PATCH] BUG 9433 Suggest box doesn't work with dependent fields SOLVED - Adjustment Suggest Clean items in the dropdown dependent. --- gulliver/system/class.xmlform.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index a7edf0729..271aa6a55 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -1275,7 +1275,8 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $sOptions .= ' getField(newcont[i].name).value = newcont[i].value; '; $sOptions .= ' if (newcont[i].content.type == \'dropdown\') { '; - $sOptions .= ' for (ni = 0; ni < newcont[i].content.options.length; ni++ ){ '; + $sOptions .= ' fieldLength = getField(newcont[i].name).options.length; '; + $sOptions .= ' for (ni = 0; ni < fieldLength; ni++ ){ '; $sOptions .= ' getField(newcont[i].name).options.remove(ni); '; $sOptions .= ' } ';