From 625374775ec3eebc3abcc7cda4a6127ae5151e3e Mon Sep 17 00:00:00 2001 From: Bjverde Date: Mon, 6 Jun 2022 16:57:02 -0300 Subject: [PATCH] :abc: BASE #267 formatando --- base/classes/webform/TForm.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/classes/webform/TForm.class.php b/base/classes/webform/TForm.class.php index 86a3322d..5d246921 100644 --- a/base/classes/webform/TForm.class.php +++ b/base/classes/webform/TForm.class.php @@ -2126,7 +2126,9 @@ public function setAutoComplete( $strFieldName } } - $strExtraParams = str_replace( array( '{', '}', ':"$', ').value"', '"jQuery("#', '\").get', '"{', '}"' ), array( '', '', ':$', ').value', 'jQuery("#', '").get', '{', '}' ), stripcslashes( json_encode( $aTemp ) ) ); + $strExtraParamsSearch = array( '{', '}', ':"$', ').value"', '"jQuery("#', '\").get', '"{', '}"' ); + $strExtraParamsReplace = array( '', '', ':$', ').value', 'jQuery("#', '").get', '{', '}' ); + $strExtraParams = str_replace( $strExtraParamsSearch, $strExtraParamsReplace, stripcslashes( json_encode( $aTemp ) ) ); $this->addJavascript( 'jQuery("#' . $strFieldName . '").autocomplete(' . $strUrl . '&ajax=1", { ajax:1, delay:' . $intDelay . ', minChars:' . $intMinChars .' ,matchSubset:1, matchContains:1, cacheLength:10, onItemSelect:fwAutoCompleteSelectItem'