add-document.phtml 597 B

12345678910111213141516171819202122
  1. <form method="POST" enctype="multipart/form-data">
  2. Collection name: <select name="name">
  3. <?php
  4. foreach($this->collections as $name) {
  5. if($name == $this->name) {
  6. $checked = " selected";
  7. } else {
  8. $checked = "";
  9. }
  10. echo "<option$checked>$name</option>";
  11. }
  12. ?>
  13. </select>
  14. <br/>
  15. ID: <input type="text" name="id"/><br/>
  16. Fields:<br/>
  17. <?php for ($i = 0; $i < $this->fieldcount; $i++): ?>
  18. <input type="text" name="field[<?php echo $i ?>][name]"/>: <input type="text"
  19. name="field[<?php echo $i ?>][value]"/><br/>
  20. <?php endfor ?>
  21. <input type="submit" value="Add!"/>
  22. </form>