Skip to content

Instantly share code, notes, and snippets.

@jbroadway
Created July 2, 2014 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbroadway/10c672bb2421e1167957 to your computer and use it in GitHub Desktop.
Save jbroadway/10c672bb2421e1167957 to your computer and use it in GitHub Desktop.
Simple single-field form test. Save to apps/test/* (rename underscores to subfolders) and view the form at the URL /test/form
; <?php /*
[one]
not empty = 1
; */ ?>
<?php
$f = new Form ('post', $this);
echo $f->handle (function ($form) {
info ($_POST);
});
?>
<form method="post" id="{{_form}}">
<p>
One:
<span class="notice" id="one-notice">Can't be empty</span><br />
<input type="text" name="one" value="{{one|quotes}}" />
</p>
<p><button>Submit</button></p>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment