You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nathan Frost 45ddd15ecf Allow preseeding form fields from URL parameters 2 months ago
CsrfException.php Initial commit 3 months ago
FileUpload.php Provide pathname of uploaded file 3 months ago
Form.php Allow preseeding form fields from URL parameters 2 months ago
FormField.php Remove unused validate() method 3 months ago
HiddenFormField.php Initial commit 3 months ago
README.md Add note on usage 3 months ago
SecretFormField.php Add SecretFormField 3 months ago
SelectField.php Initial commit 3 months ago
StaticFormField.php Add uneditable text field 2 months ago
UploadException.php Initial commit 3 months ago
test.php Allow preseeding form fields from URL parameters 2 months ago

README.md

Post

Some code to formalize parsing POST data and generating HTML forms. This is made as an attempt to de-duplicate code around generating forms with pre-existing data filled in.

There is no templating included, the final step for HTML generation must be done by the parent application. An example parent application is given in test.php.

Due to a lack of useful documentation, test.php is also the reference implementation.

Testing is done by clicking around in test.php.

Dependencies

  • session_start() needs to be called from the parent application
  • openssl is required for CRSF token generation
  • class autoloading needs to be done from parent application

How to use it

Include it via git checkout or submodule into the class autoload directories, under Post/. There is no packaging for compose etc, this is mostly meant for conventional php applications.