diff --git a/resources/views/extend/forms/fields.antlers.html b/resources/views/extend/forms/fields.antlers.html index 519bc79910..140c41c90a 100644 --- a/resources/views/extend/forms/fields.antlers.html +++ b/resources/views/extend/forms/fields.antlers.html @@ -6,11 +6,8 @@ * {{ /if }} - {{ if instructions && instructions_position == "above" }} -
{{ instructions }}
- {{ /if }} -{{ instructions }}
{{ /if }} {{ if error }} diff --git a/src/Forms/FieldsVariable.php b/src/Forms/FieldsVariable.php deleted file mode 100644 index 542333370d..0000000000 --- a/src/Forms/FieldsVariable.php +++ /dev/null @@ -1,21 +0,0 @@ - $fields])->render(), - $fields - ); - } - - public function toArray() - { - return $this->extra; - } -} diff --git a/src/Forms/Tags.php b/src/Forms/Tags.php index 8a7d816043..f44018e7c6 100644 --- a/src/Forms/Tags.php +++ b/src/Forms/Tags.php @@ -74,7 +74,7 @@ public function create() $data['sections'] = $this->getSections($this->sessionHandle(), $jsDriver); - $data['fields'] = new FieldsVariable(collect($data['sections'])->flatMap->fields->all()); + $data['fields'] = collect($data['sections'])->flatMap->fields->all(); $data['honeypot'] = $form->honeypot(); diff --git a/tests/Tags/Form/FormCreateTest.php b/tests/Tags/Form/FormCreateTest.php index cbbd668037..3be2cc95ad 100644 --- a/tests/Tags/Form/FormCreateTest.php +++ b/tests/Tags/Form/FormCreateTest.php @@ -5,13 +5,10 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; -use Illuminate\Testing\Assert as PHPUnit; -use Illuminate\Testing\Constraints\SeeInOrder; use Illuminate\Validation\ValidationException; use PHPUnit\Framework\Attributes\Test; use Statamic\Facades\AssetContainer; use Statamic\Facades\Form; -use Statamic\Forms\FieldsVariable; use Statamic\Statamic; class FormCreateTest extends FormTestCase @@ -77,26 +74,6 @@ public function it_dynamically_renders_fields_array() $this->assertEquals(['Full Name', 'Email Address', 'Message'], $fieldOrder[1]); } - #[Test] - public function it_dynamically_renders_fields_view_using_single_tag() - { - $output = $this->normalizeHtml($this->tag(<<<'EOT' -{{ form:contact }} - {{ fields }} -{{ /form:contact }} -EOT - )); - - PHPUnit::assertThat([ - '', - '', - '', - '', - '', - '', - ], new SeeInOrder($output)); - } - #[Test] public function it_dynamically_renders_with_form_handle() { @@ -527,20 +504,20 @@ public function it_dynamically_renders_sections_array() $output = $this->normalizeHtml($this->tag(<<<'EOT' {{ form:survey }} {{ sections }} -