diff --git a/wire/core/Inputfield.php b/wire/core/Inputfield.php index 7e2c4d2a..7b4bfe0a 100644 --- a/wire/core/Inputfield.php +++ b/wire/core/Inputfield.php @@ -1467,7 +1467,11 @@ abstract class Inputfield extends WireData implements Module { * */ public function renderReady(Inputfield $parent = null, $renderValueMode = false) { - $result = $this->wire()->modules->loadModuleFileAssets($this) > 0; + if($this->className() === 'InputfieldWrapper') { + $result = false; + } else { + $result = $this->wire()->modules->loadModuleFileAssets($this) > 0; + } if($this->wire()->hooks->isMethodHooked($this, 'renderReadyHook')) { $this->renderReadyHook($parent, $renderValueMode); } diff --git a/wire/core/InputfieldWrapper.php b/wire/core/InputfieldWrapper.php index 907b1c70..bfe3e312 100644 --- a/wire/core/InputfieldWrapper.php +++ b/wire/core/InputfieldWrapper.php @@ -1182,7 +1182,22 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre $url .= "renderInputfieldAjax=$inputfieldID"; $url = $sanitizer->entities($url); - $out = "
"; + $valueInput = ''; + $val = $inputfield->val(); + if(!is_array($val) && !is_object($val)) { + $val = (string) $val; + if(strlen("$val") <= 1024) { + // keep value in hidden input so dependences can refer to it + $val = $sanitizer->entities("$val"); + $valueInput = ""; + } + } + + $out = + "
" . + "" . + $valueInput . + "
"; if($inputfield instanceof InputfieldWrapper) { // load assets they will need diff --git a/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module b/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module index 04950cb9..636ecfff 100644 --- a/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module +++ b/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module @@ -182,6 +182,7 @@ class InputfieldPageAutocomplete extends Inputfield implements InputfieldHasArra $class = 'ui-autocomplete-input ' . ($this->useList ? 'has_list' : 'no_list'); if($this->useAndWords) $class .= " and_words"; if($this->allowAnyValue) $class .= " allow_any"; + $class = trim($sanitizer->entities("$class " . $this->attr('class'))); $disableChars = $this->disableChars; if($disableChars) {