- Add
buttongroup
field type - #298 (Thanks to @noxify) - Allow custom
id
andfor
attributes for a field - #285 - Fix accessing fields from twig by adding
__isset
magic method - #301 - Use custom Form macro for labels in views
- Bump minimum php version to 5.6 - #276 (Thanks to @max-kovpak)
- Add support for Laravel 5.3 and fix EntityType lists method - #276 (Thanks to @max-kovpak)
- Add
alterFieldValues
andalterValid
methods to Form class - #272 (Thanks to @rudiedirkx) - Fix collection type to use current request data if old input is not available - issue #268
- Fix automatic class append functionality that was added in PR #220 - use
class_append
option instead.
- Add default classes per field - #220 (Thanks to @jvdlaar)
- Set up ServiceProvider to be compatible with Laravel 5.3 - #236 (Thanks to @marcoraddatz)
- Added
getFieldValues
method to form which returns all field values from request - #248 (Thanks to @rudiedirkx) - Added events after form and field creation/validation - #254 (Thanks to @rudiedirkx)
- Allow nested field names without usage of any child fields - #251 (Thanks to @rudiedirkx)
- Add
redirectIfNotValid
method to Form - #258 (Thanks to @koenvu) - Add
class_append
option forlabel_attr
,attr
andwrapper
options which appends classes to the default ones - #257 (Thanks to @koenvu) - Add
form_rows
helper method, and passchild_form
to view in ChildFormType, which contains internal Form instance - #262 (Thanks to @rudiedirkx) - Fix adding
required
class to label even without client validation enabled - #261 (Thanks to @koenvu)
- Fix bug where
error_messages
were not namespaced properly in child forms (#225) - Add check for field name and forbid reserved words (#232)
- Use Symfony's
TranslatorInterface
instead of Laravel's Translator implementation(#231)
- Add check for nested translations (Thanks to @paultela)
- Add
label_show
property for field to allow hiding the label without setting it to false (Fixes issue with validation where error message requires label) - Add
error_messages
property for field to allow defining error messages inbuildForm
.
- Translate form field labels if translation exist, and add
language_name
option to Form class in order to allow translating fields from specifing file (Thanks to @koenvu) - Add required attribute if validation rules contains
required
option (Thanks to @koenvu) - Fix issue #211 - Multiple select name wrong in subform
- Fix issue #212 - ChoiceType ignoring own validation rules
- Fix issue #213 - required attribute applied even if client validation is disabled
- Fix issue #191 - clientValidationEnabled for child forms not working
- Fix issue #202 - 'Field already exists' exception when using
compose()
method - Fix issue #204 - 'default_value' not handled properly for CheckableType
- Fix issue #205 - Data not being passed properly to child form
- Fix LaravelCollective compatibility with older versions of Laravel (Thanks to @marcoraddatz)
- Do not throw exception when trying to remove non existing field - #149 (Thanks to @marcoraddatz)
- Fix README to match php 5.5+ syntax (Thanks to @marcoraddatz)
- Setup compatibility with Laravel 5.2 and LaravelCollective
- Bump php requirement to version 5.5
- Fix bug where different request was used in tests
- Fix
setModel
method - Add some deprecation warnings
- Add
template_prefix
option form form and fields (Thanks to @koenvu) - Add
empty_row
option for Collection type to remove initial empty row when there is no data for it - Add
removeChild
option for ParentType fields to allow removing child - Fix child form value binding when parent form has a name.
- Fix
renderUntil
to throw exception when field does not exist (Thanks to @pnoonan) - Fix form stub to satisfy PSR-2 standard (Thanks to @koenvu)
- Add client side validation (Thanks to @barryvdh)
- Extract some part of html in views to own partial
- Fix select with
multiple
option naming (#150) - Fix model binding on existing instances of child form(#157)
- Fix duplicate
help_block
on select/choice (#153)
- Add Validation to the Form class (#135)
- Add getters for value and default_value (getValue() and getDefaultValue())
- Add option to pass template to form class through options
- Make setValue method public
- Make unspecified labels to use ucfirst instead of ucwords
- Add
path
andnamespace
options to the form class generator command.
- Fix checkables checked state not working with model
- Fix adding
for
attribute twice to label - Add some tests
- Replace Illuminate/Html with LaravelCollective/Html
- add
disableFields
andenableFields
functions to Form class to allow disabling all fields in the form - Fix collection type model value binding
-
Minor BC Break - Rename
default_value
tovalue
, and usedefault_value
as fallback value if novalue
or model data availableIf You published views update all templates and set
$options['default_value']
to$options['value']
-
Add form composition (Add fields from another form with
compose()
method) - Thanks to @theshaunwalker -
Add trait for controller that allows shorter sintax (
$this->form()
and$this->plain()
) -
Fix
renderUntil
to check the name by real name instead of namespaced name -
Fix collection of child forms not rendering when there is no data
-
Fix collection prototype to return proper
prototype_name
for nested collections -
Return
$this
fromrebuildForm()
method to allow regenerating form in loops
- Fix collection of forms not rendering when there is no model or any data passed to collection.
- Add
entity
field type that allows fetching specific Model data
- Bind all fields values manually without Laravel's form builder
Form::model
(Check note below for possible BC break) - Add possibility to use Closure as default value for fields which solves issues like in #98
- Fix passing model to child forms
- Set FormBuilder class properties to protected to allow extending
- Optmization and other minor fixes
gg
Note: If You published views before, they need to be updated to prevent possible breaking.
Since value binding is now done in package, and
Form::model
is removed, views needs to be republished (or updated) to removeForm::model
from form.php. Also choice.php needs to be updated to passselected
value.
- Fix expanded/multiple choice fields id by prefixing it with properly formatted name
- Add
addBefore
andaddAfter
methods to Form class to allow adding fields at specific location - Add
required
option for all field types, that adds classrequired
(configurable in config) to label, andrequired
attribute to field.
- Fix choice field type not adding
[]
on regular forms
- Add
wrapper
option for button type, defaults to false - Fix
help_block
rendering twice on repeated field type - Fix choice field type adding additional
[]
to the name in child forms/collections
- Add
help_block
option for fields which renders note under the field (http://getbootstrap.com/css/#forms) - Fix repeated type not closing tags properly
- Fix default_value for child forms (#77)
- Pass form data to child forms.
- Fix issue with showing validation errors for nested forms (#78. Thanks to @theshaunwalker)
- Add ability to exclude some fields from rendering (PR-77. Thanks to @theshaunwalker)
- Use old input for collection field type. (Example: after failed validation, redirect back withInput).
- Add
static
type field. - Add
form_until
function that renders fields until specified field(Thanks to @hackel) - using
getData
without param returns all data
- Bind data to child form every time to allow setting null.
- Fix id and name collision.
- Fix collection type form model binding.
- Fix custom template per field.
- Fix adding enctype multipart/form-data to form when field is of type file.
- Fix setting field id on child forms.
- Allow calling form methods directly from child form
- Update views to print all errors for single field
- Fix custom field template for child forms
- Fix disabling errors for fields in form class
- Fix form model binding for named forms
- Collection type now pulls data from model if data not passed in
data
option
- Fix choices to show only one error message
- Update
repeated
type to work with child forms - Add possibility to create named forms (fields get name[fieldname])
- Add support for some HTML5 input types(By @bishopb)
- Add
choice_options
property tochoice
field type that handles each radio/checkbox options whenexpanded
is true. - Allow disabling wrapper for fields by setting it to
false
- Fix child form rebuild bug.
- Don't override existing aliases for Form and Html (Fixed by @squigg)
- Allow passing any type of model to form class (array, object, eloquent model, Collection).
- Fix bug where wrapper was not showing if label was false.
- Add Collection type
- Minor fixes
- Allow adding child forms with full class name which will be instantiated automatically
- Add FormBuilder class instance to the Form class
- Setting label explicitly to false in the field options disables printing label for that field
- Minor fixes
- Add
default_namespace
configuration to allow typing only class name when creating form (Same functionality like for routes)
- Fix
loadViewsFrom
in the service provider and add publishes paths.
- Fix service provider.
- Dynamically access children in parent form types.
- Fix empty select value to be empty string instead of
0
- Append
[]
to field name automatically if multiple attribute is set to true.
- Fix
child form validation errors not showing
bug.
- Added
repeated
type field (https://github.com/kristijanhusak/laravel-form-builder#field-customization) - Minor fixes
- Added Child form type
- Added
rebuildForm
method - Added
getRequest
method - Added
setData
andgetData
options to form - Minor fixes
form_end()
function now also renders rest of the form fields - can be changed with 2nd parameter as false(form_end($form, false)
)- Minor fixes
- Added
remove()
andmodify()
methods to Form class - Added 'empty_value' option for select
choice
andselect
types now needsselected
option to pass key instead of value of choice
- Added Laravel 4 support (Tags 0.*)
- Config loaded outside of class and injected as array
- Changed command from
laravel-form-builder:make
toform:make
- Initial version