Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php
  2. //screen layout code
  3.  
  4. public function layout(): array
  5. {
  6.  
  7.  
  8. return [
  9. Layout::wrapper("platform::custom_views.ajax_form", [
  10.  
  11. "element" => [
  12. Layout::rows([
  13. TextArea::make('trainingResource.description.')
  14. ->title('Description')
  15. ->required(),
  16. Input::make('trainingResource.file.')->type('file')
  17.  
  18. ]),
  19.  
  20. ]
  21. ])
  22.  
  23. ];
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. //layout wrapper view
  31.  
  32. <form id="post-ajax-form"
  33. class="wrapper"
  34. method="post"
  35. enctype="multipart/form-data"
  36. data-controller="custom--ajaxupload"
  37. data-action="custom--ajaxupload#submit"
  38. novalidate
  39. >
  40. @foreach($element as $elementKey=>$elementValue)
  41. {!! $elementValue !!}
  42.  
  43. @endforeach
  44. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement