diff --git a/cf2/Fields/RenderField.php b/cf2/Fields/RenderField.php index 8cfc1249a..65faa3864 100644 --- a/cf2/Fields/RenderField.php +++ b/cf2/Fields/RenderField.php @@ -117,7 +117,7 @@ public function data() 'fieldLabel' => $this->field['label'], 'fieldCaption' => $this->field['caption'], 'fieldPlaceHolder' => '', - 'required' => ! empty($this->field['required'])?true:false, + 'isRequired' => ! empty($this->field['required'])?true:false, 'fieldDefault' => isset($this->field['config']['default'])? $this->field['config']['default'] : '', 'fieldValue' => '', 'fieldIdAttr' => $this->field['fieldIdAttr'], diff --git a/tests/Unit/RenderFieldTest.php b/tests/Unit/RenderFieldTest.php index 0000ba250..719bab657 100644 --- a/tests/Unit/RenderFieldTest.php +++ b/tests/Unit/RenderFieldTest.php @@ -63,7 +63,7 @@ public function testData() 'fieldLabel' => 'Email', 'fieldCaption' => 'Make emails', 'fieldPlaceHolder' => '', - 'required' => 1, + 'isRequired' => 1, 'fieldDefault' => '', 'fieldValue' => '', 'fieldIdAttr' => 'fld_1',