Formr Formr Versions Save

Create and Validate PHP Forms in Seconds.

1.5.0

2 months ago

Potentially Breaking Changes

  • Dropped support for PHP 7.x.
  • Submitting HTML in form fields is now disabled by default.
  • Wrappers have been rewritten. Everything should be okay, but check your layouts before using in production just in case!

What's Changed

  • PHP minimum version is now 8.1.
  • Formr no longer allows HTML in form fields as a default behavior.
  • Removed several older PHP string and mcrypt functions, and replaced them with modern PHP 8 functions.
  • Added a check to make sure a directory exists before uploading files.
  • Added better support for checking if custom classes are being used.
  • Removed the Reflection method when checking for custom wrapper classes.
  • Rewrote the wrapper instantiation.
  • Cleaned up the wrapper classes.
  • Cleaned up a bunch of junk and removed a few unused methods.

Added a wrapper for Tailwind CSS

  • Formr now has a Tailwind wrapper.
  • You must require the @tailwindcss/forms plugin in your tailwind.config.js file for the wrapper to work properly.
  • You can find the Tailwind classes inside the Tailwind wrapper trait located at lib/wrappers/tailwind.php.

Note

  • I did not add return types or type hints because the code was written under PHP 5, so adding them would basically kill your app because I did a lousy job of creating the methods and properties back in the day.

  • The Bootstrap 3 and 4 wrappers have not been updated as they are obsolete.

v1.4.11

2 months ago
  • Resolves an issue with $_SESSION and checkbox/dropdown arrays
  • Updated a Bootstrap wrapper class name

1.4.10

9 months ago
  • Fixed an infinite loop issue when using custom wrappers

1.4.9

1 year ago
  • Fixed an issue where validation rules would run if the field was empty and not required
  • Fixed an issue with the required indicator (*) in the Bootstrap wrapper

v1.4.8

1 year ago
  • Fixed an issue with Fastform not creating a multiple select list
  • Fixed an issue with a default select_multiple() item being selected when empty
  • Fixed an issue with $_SESSION

v1.4.7

1 year ago
  • Updated for PHP 8.2
  • Removed CSRF token from $form->send_email()
  • Added Former version and PHP version to $form->info()

1.4.6

1 year ago
  • Added a value attribute to the honeypot method.
  • Bug fixes

1.4.5

1 year ago

Added an error() function to print out inline error messages

$form->text('first_name', 'First name');
$form->error('first_name');

Fixed an issue where hidden elements would not have an ID.

Fixed an issue where changing the name of uploaded files would truncate the filename.

v1.4.4

2 years ago

You can now add custom headers to your HTML emails when using send_email()

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "From: " . $from . "\r\n";

$form->send_email($to, $subject, $message, $from, 'HTML', $headers);

You can now set a timeout duration for CSRF in FastForm.

// Set the CSRF timeout to 1800 seconds
$form->fastform($data, 1800);
  • Fixed an issue with CSRF checks where multiple error messages would show if the SESSION expired.
  • CSRF timeout error messages will now be styled in your wrapper's error alert format.

v1.4.3

2 years ago

Bug fixes