From c0b30dbb24d30845d98ab1c9d103bbead1a6e629 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 21 Jun 2016 05:48:21 -0400 Subject: [PATCH] Update to support Inputfield module config settings that are not predefined per issue mentioned by Macrura. --- wire/core/Field.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wire/core/Field.php b/wire/core/Field.php index 5e038668..862728fa 100644 --- a/wire/core/Field.php +++ b/wire/core/Field.php @@ -786,7 +786,12 @@ public function ___getInputfield(Page $page, $contextStr = '') { // custom field settings foreach($this->data as $key => $value) { - if($inputfield->hasSetting($key) || $inputfield->hasAttribute($key)) { + if($inputfield instanceof InputfieldWrapper) { + $has = $inputfield->hasSetting($key) || $inputfield->hasAttribute($key); + } else { + $has = $inputfield->has($key); + } + if($has) { if(is_array($this->trackGets)) $this->trackGets($key); $inputfield->set($key, $value); }