Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //screen layout code
- public function layout(): array
- {
- return [
- Layout::wrapper("platform::custom_views.ajax_form", [
- "element" => [
- Layout::rows([
- TextArea::make('trainingResource.description.')
- ->title('Description')
- ->required(),
- Input::make('trainingResource.file.')->type('file')
- ]),
- ]
- ])
- ];
- }
- //layout wrapper view
- <form id="post-ajax-form"
- class="wrapper"
- method="post"
- enctype="multipart/form-data"
- data-controller="custom--ajaxupload"
- data-action="custom--ajaxupload#submit"
- novalidate
- >
- @foreach($element as $elementKey=>$elementValue)
- {!! $elementValue !!}
- @endforeach
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement