Skip to content

Releases: formers/former

3.4.2

09 Feb 00:37
Compare
Choose a tag to compare
  • [add] Added the ability to specify multiple namespaces to look for fields in the MethodDispatcher
  • [mod] Appended buttons are now properly wrapped in input-group-btn in Bootstrap 3
  • [fix] Fixed a bug where wrong items would get selected in optgroups
  • [fix] Fixed some bug when fetching data from the request
  • [fix] Fixed spaces in validation rules causing errors

3.4.1

14 Jan 11:58
Compare
Choose a tag to compare
  • [add] Added support for passing MessageBag instances to withErrors
  • [mod] MethodDispatcher can now look for field classes in multiple namespaces
  • [mod] Use objects' toArray instead of array casting when possible
  • [fix] Fix framework classes overwriting classes predefined on Field classes
  • [fix] Fix stability problems that prevented Former form being installed

3.4.0

21 Dec 16:35
Compare
Choose a tag to compare
  • [add] Added Former::rawOpen to open a temporary no-framework/no-label form
  • [add] Added support for camelCase form openers (ie. verticalOpen and vertical_open)
  • [add] Added possibility to disable automatic capitalization of translations
  • [fix] Fixed a bug where two fields with the same name would get the same ID
  • [fix] Various bugfixes related to repopulation
  • [fix] Fix various memory and 4.1 compatibility issues

3.3.0

05 Nov 18:44
Compare
Choose a tag to compare
  • [add] Add ability to pass attributes to a select's options
  • [add] Add support for PATCH method
  • [add] Add ability to create range number fields (Former::number('foo')->range(1, 5) sets the min to 1 and max to 5)
  • [add] Added Form->route and Form->controller to set a form's action to a route/controller path, and the corresponding method
  • [add] Allow switching to alternate icon fonts
  • [mod] Form classes are now framework-dependant
  • [mod] More work on the Bootstrap 3 integration
  • [fix] Prevent custom groups from responding to errors from non-grouped fields
  • [fix] Fix bug in selection false values in Selects
  • [fix] Fix bug where selects with optgroups weren't populated correctly

3.2.0

05 Nov 18:44
Compare
Choose a tag to compare
  • [mod] Updated TwitterBootstrap3 to the latest release
  • [mod] Former now handles camelCase attributes (ie. dataPlaceholder for data-placeholder)
  • [mod] $group->getErrors() is now public

3.1.0

05 Aug 15:50
Compare
Choose a tag to compare
  • [add] You can now configure which attributes are translated by default
  • [add] Added the TwitterBootstrap3 framework
  • [add] Add a second argument to Former::group that allows specifying which errors should be displayed
  • [add] Add ability to interact with the Group's method by using onGroup{method} (ex: onGroupAddClass)
  • [mod] All fields are now displayed as "raw" by default in custom groups
  • [fix] Fix some checkable bugs

3.0.0

09 Jul 09:56
Compare
Choose a tag to compare

Major changes

  • Refactor of Former – the project is now framework agnostic, see installation details
  • Frameworks names renamed from bootstrap to TwitterBootstrap, zurb to ZurbFoundation and null to Nude
  • New ZurbFoundation4 framework
  • The alias is now Former\Facades\Former for everyone : Laravel 3, 4 or raw PHP
  • The main branch is now master (previously agnostic). It works on Laravel 3 with a composer install but the hardcoded dependencies are still available in the laravel3 branch

Additions

  • You can now chain methods to actions blocks Former::actions('Hello', 'Mr Bond')->id('foo')->addClass('bar')
  • You can now chain buttons to actions blocks Former::actions()->large_primary_submit('Submit')
  • You can now chain live validation rules to fields (example: Former::text('foo')->alpha_dash())
  • You can now display a single field without control group in any kind of form (Former::text('foo')->raw())
  • You can now manually open groups via Former::group('label')
  • You can also create a group that contains raw content (not a field) with Former::group('label')->contents('YourContent'). This will wrap the content in a control class so that your content is aligned with the fields.
  • Support for select groups
  • You can now add classes to the group via the ->addGroupClass method
  • Former::withRules() now also take a Laravel-formatted string of rules (ie. "rule|rule:parameter|rule")
  • You can now populate on a form-basis with the chained method ->populate on a form opener
  • Add support for macros with Former::macro($name, $macro())
  • Add Select->range() method
  • Former now automatically inserts a token in the form

Bugfixes

  • Lots of them
  • Mostly bugs related to checkables