diff --git a/src/fields/DynamicOptionsField.php b/src/fields/DynamicOptionsField.php index c509a29..08c9f50 100644 --- a/src/fields/DynamicOptionsField.php +++ b/src/fields/DynamicOptionsField.php @@ -124,7 +124,7 @@ public function getInputHtml($value, ElementInterface $element = null): string $variables['element'] = $element; //$variables['model'] = $this->model; - $options = Json::decode('['.Craft::$app->getView()->renderString($this->json, $variables).']', true); + $options = Json::decode(Craft::$app->getView()->renderString($this->json, $variables), true); Craft::$app->getView()->setTemplateMode($oldMode); // Variables to pass down to our field JavaScript to let it namespace properly