SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/style_guide/multiedit.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Form;
  4. use Sprout\Helpers\MultiEdit;
  5. ?>
  6.  
  7.  
  8. <?php
  9. if (!empty($_POST)) {
  10. echo '<pre>', Enc::html(print_r($_POST, true)), '</pre>';
  11. }
  12. ?>
  13.  
  14.  
  15. <form action="" method="post">
  16. <div id="multiedit-demo">
  17. <div class="columns">
  18. <div class="column column-4">
  19. <?php
  20. Form::nextFieldDetails('Name', true);
  21. echo Form::text('m_name', [], []);
  22. ?>
  23. </div>
  24. <div class="column column-4">
  25. <?php
  26. Form::nextFieldDetails('DOB', true);
  27. echo Form::datepicker('m_dob', [], []);
  28. ?>
  29. </div>
  30. <div class="column column-4">
  31. <?php
  32. Form::nextFieldDetails('Photo', true);
  33. echo Form::fileSelector('m_photo', [], []);
  34. ?>
  35. </div>
  36. </div>
  37. </div>
  38.  
  39. <?php
  40. MultiEdit::display('demo', @$_POST['multiedit_demo'], []);
  41. ?>
  42.  
  43. <button type="submit" class="button right">Submit form</button>
  44. </form>