CHANGELOG

CHANGELOG
Last Update: 2024-02-13 07:26:32 -0800

2.5.0 (2024-02-13)

  • Add hidden inputs to work with formaction/formmethod support in Roda 3.77+ route_csrf plugin (jeremyevans)

  • Support :formaction option on buttons (jeremyevans)

  • Support emit: false option for non-rails template forms allowing block based form use without appending to template (jeremyevans)

2.4.1 (2023-09-19)

  • Add dependency on bigdecimal, as bigdecimal is moving from standard library to bundled gem in Ruby 3.4 (jeremyevans)

2.4.0 (2023-04-05)

  • Support Sequel::Model#forme_use_required_abbr? to control whether to add abbr * tag for required inputs (jeremyevans) (#105)

  • Make select input with option groups and a :value option correctly set selected attribute on options in all optgroups (v-kolesnikov) (#111, #110)

  • Make Roda forme_set plugin only include metadata for inputs in the same form, and not inputs on other forms on the same page (jeremyevans) (#109)

  • Use erb/escape for faster HTML escaping if available (jeremyevans)

2.3.0 (2022-11-15)

  • Add forme/bs5 for Bootstrap 5 support (janko) (#106)

  • Raise exception if attempting to load Roda forme_set plugin without setting :secret option (janko) (#104)

2.2.0 (2022-06-28)

  • Use inputmode and pattern attributes instead of type=number for integer fields in the Sequel forme plugin (jeremyevans)

  • Respect explicit nil/false :value option for boolean inputs in the Sequel forme plugin (jeremyevans)

  • In bs3 support, make sure error spans have id referenced by aria-describedby (jeremyevans)

  • Set aria-describedby attribute automatically even if :error_id is given manually (jeremyevans)

2.1.0 (2022-05-25)

  • Avoid hidden inputs inside tbody tags in subform in the Sequel::Model support, since that results in invalid HTML (jeremyevans)

  • Fix verbose warnings in forme/rails (jeremyevans)

  • Remove deprecated forme/sinatra and Forme::Sinatra::ERB (jeremyevans)

  • Remove deprecated Form :hidden_tags option (jeremyevans)

2.0.0 (2021-11-30)

  • Remove Tag#<< method (jeremyevans)

  • Remove Form#_inputs method (jeremyevans)

  • Deprecate forme/sinatra and Forme::Sinatra::ERB, switch to forme/erb and Forme::ERB::Helper (jeremyevans)

  • Deprecate Form :hidden_tags option (jeremyevans)

  • Add Form#post? for whether the form will submit via POST (jeremyevans)

  • Add Form#form_tag_attributes for getting the attributes used for the form tag (jeremyevans)

  • Add :before and :after Form options, as an alternative way to implement hooks (jeremyevans)

  • Passing a callable as the child of a tag should now not call methods that will modify the related form (such as Form#tag) (jeremyevans)

  • Change API for _forme_form_options private method used in template integrations (jeremyevans)

  • Remove Form#{nesting,tag_,raw_output,emit} (jeremyevans)

  • Make Form#{form,tag,input,inputs} return HTML string (jeremyevans)

  • Refactor internals, switch template integration to use delegation instead of inheritance (jeremyevans)

  • Add Roda forme_erubi_capture plugin to support erubi/capture_end <%|= form do %> <%| end %> tags (jeremyevans)

  • Make bs3 formatter automatically setup aria-invalid and aria-describedby attributes for errors (waiting-for-dev) (#96)

  • Make bs3 formatter handle form-level :errors key (waiting-for-dev) (#96)

  • Drop support for Ruby 1.8 (jeremyevans)

1.12.0 (2021-08-25)

  • Make forme_set Sequel plugin handle frozen Sequel::Model instances (jeremyevans)

  • Do not override an error on a field when using the Sequel plugin if :error option is already given (jeremyevans)

  • Avoid error when creating label text when using Sequel input on non-Sequel form without an explicit :label option (jeremyevans)

  • Make :select_options option for date/datetime selects support providing both option texts and option values using a 2 element array (jeremyevans)

1.11.0 (2020-01-03)

  • Add Roda forme_set plugin, using HMACed form metadata to automatically handle submitted form parameters (jeremyevans)

1.10.0 (2019-05-13)

  • Make readonly formatter ignore hidden inputs (jeremyevans)

  • Add :select_labels for date inputs using :as=>:select to use labels for the inputs for better accessibility (jeremyevans)

  • Add :after_legend error_handler for adding error message after legend when using :legend labeler (jeremyevans)

  • Add aria-describedby to all inputs with errors where possible for better accessibility (jeremyevans)

  • Add aria-invalid to all inputs with errors for better accessibility (jeremyevans)

  • Support :fieldset wrapper and :legend labeler, can be used for accessible radioset/checkboxset (jeremyevans)

  • Support :tag_label_attr option for radioset and checkbox set for label attributes for each radio/checkbox label (jeremyevans)

  • Support custom :error_handler in radioset and checkboxset inputs (jeremyevans)

  • Support custom :labeler in radioset and checkboxset inputs (jeremyevans)

  • Avoid calling Proc.new with an implicit block, which is deprecated starting in ruby 2.7 (jeremyevans)

1.9.0 (2018-11-16)

  • Automatically add maxlength attributes to text and textarea inputs in the Sequel plugin based on maximum database column length (jeremyevans)

  • Make forme_set Sequel plugin recognize default formatter changes set via with_opts (jeremyevans)

  • Use div with nested p tags instead of spans for readonly textarea inputs (jeremyevans)

  • Make readonly text input spans use the readonly-text class for easier styling (jeremyevans)

  • Add Forme.h for HTML escaping, using cgi/escape if available for faster escaping (jeremyevans)

  • Correctly handle :value=>false option and false option values in select, radioset, and checkboxset inputs (jeremyevans)

1.8.0 (2018-06-11)

  • Add support for :errors form option for setting error information for multiple inputs, similar to :values form option (adam12) (#32)

  • Add Roda forme_route_csrf plugin using route_csrf plugin for request-specific CSRF tokens (jeremyevans)

  • Add forme_default_request_method as a method to check for object forms, setting the default form method (jeremyevans)

  • Support :dasherize_data input option to convert underscores to dashes for :data hash symbol keys (janko-m) (#29)

  • Omit labels for hidden inputs in Sequel plugin (janko-m) (#27)

  • Allow use of :type option for specifying input type when using an associated object that doesn’t respond to forme_input (janko-m) (#25)

  • Ignore default values for Sequel inputs when type: :file option is used (janko-m) (#24)

1.7.0 (2018-02-07)

  • Have radioset and checkboxset inputs respect :error_attr option (jeremyevans)

  • Add :tag_labeler option for checkboxsets and radiosets for the labeler to use for individual elements (jeremyevans)

  • Use milliseconds instead of microseconds for serializing Time and DateTime values, since that’s what datetime-local inputs support (jeremyevans)

1.6.0 (2017-05-03)

  • Use thead/tbody tags for table inputs_wrapper transformer and Sequel plugin subform :grid option (jeremyevans)

  • Do not create a hidden input for checkboxes when using disabled/readonly formatters (jeremyevans)

  • Add support for overriding forme_namespace on the Sequel::Model instance to change forme’s namespacing (mwpastore, jeremyevans) (#17)

  • Allow :label_attr for checkboxset and radioset to set attributes for individual labels in the set (jeremyevans)

1.5.0 (2016-08-09)

  • Add forme_set Sequel plugin, for handling the intake of submitted params based on form fields (jeremyevans)

  • Only add csrf tag in forme/erb support if there is a current session in the environment (jeremyevans)

  • Fix frozen string literal issue in explicit labeler (jeremyevans)

  • Add forme_i18n Sequel plugin, for internalization support (badosu) (#15)

1.4.0 (2016-02-01)

  • Ignore submit buttons when using the :readonly formatter (jeremyevans)

  • Respect :formatter option for radioset and checkboxset inputs (jeremyevans)

  • Add support for running with –enable-frozen-string-literal on ruby 2.3 (jeremyevans)

  • Integrate with the Sequel association_pks plugin in the Sequel plugin (jeremyevans)

  • Do not add required * to label if :label=>nil in the Sequel plugin (jeremyevans)

  • Add forme/bs3 library for Bootstrap 3 support (kematzy, jeremyevans) (#12, #14)

  • Support an :html option in the default formatter to override the HTML created (jeremyevans)

1.3.0 (2015-04-17)

  • Support option groups in select, checkboxset, and radioset inputs via :optgroups option (jeremyevans)

  • Support :select_options option for date/datetime :as=>:select, for setting specific options in each select field (jeremyevans)

  • The id for first select input for date/datetime :as=>:select is now the same as the :id option/attribute (jeremyevans)

  • Support :order option for date/datetime :as=>:select inputs, so you can order select boxes day/month/year or month/day/year (jeremyevans)

  • Add helper transformer type, for adding help text next to fields (jeremyevans)

  • Support :skip_primary_key option to not add hidden primary key fields for existing associated objects in subform in the Sequel plugin (jeremyevans)

  • Support :blank_attr option for select/radioset/checkboxset inputs (jeremyevans)

  • Support :blank_position=>:after option for select/radioset/checkboxset inputs (jeremyevans)

  • Respect existing :add_blank option when using select tags for boolean fields in the Sequel plugin (jeremyevans)

  • Use type=datetime-local for datetime types (jeremyevans)

  • Handle error messages on the underlying column in pg_array_to_many associations (jeremyevans)

1.2.0 (2014-11-06)

  • Support pg_array_to_many associations in the Sequel plugin, treating them similarly to other *_to_many associations (jeremyevans)

  • When using :grid option to subform in the Sequel plugin, :inputs_opts can be used to pass options to the InputsWrapper (jeremyevans)

  • Support :error_attr option for inputs, for setting attributes to use for error message span (jeremyevans)

  • Make explicit labeler use label-before and label-after classes specifying the label position (jeremyevans)

  • Support :size option for select inputs (jeremyevans)

1.1.0 (2014-09-07)

  • Make form without a block in the ERB integration still use hidden tags if method is post (jeremyevans)

  • Add Forme::RawString class, Forme.raw, and Form#raw for creating raw strings, so you don’t need to use extend(Forme::Raw) (jeremyevans)

  • Allow using nil as explicit transformer value when creating a Form, to disable default transformer (jeremyevans)

1.0.0 (2014-07-30)

  • Add roda plugin for forme (jeremyevans)

  • Move forme/sinatra to forme/erb, since it is ERB and not Sinatra specific (jeremyevans)

  • Do not extend objects at runtime when using the Sequel support (jeremyevans)

0.10.0 (2014-07-01)

  • Use [] instead of send to get input value for object forms if object is a hash (jeremyevans)

  • Add Form#each_obj, for iterating over an Enumerable of objects, using with_obj for each object (jeremyevans)

  • Add Form#with_obj, for changing a Form’s object and namespace temporarily (jeremyevans)

  • Support changing the namespace for a Form temporarily using with_opts(:namespace=>[‘ns1’, ‘ns2’]) (jeremyevans)

  • Use current namespace for form object inputs if :id/:name/:key is not specified (jeremyevans)

  • Remove SequelForm#nested_associations accessor methods, no longer necessary (jeremyevans)

  • Support changing the object for a Form temporarily using with_opts(:obj=>new_obj) (jeremyevans)

  • Add :table, :tr, :ol, and :fieldset_ol wrappers, which automatically set wrapper and inputs_wrapper appropriately (jeremyevans)

  • Add subform :grid option in Sequel plugin, for more compact editing of nested *_to_many associations (jeremyevans)

  • Make table inputs_wrapper accept a :labels option and automatically set up th tags with the labels for each column (jeremyevans)

  • Form#inputs now accepts a :nested_inputs_wrapper option to set default inputs_wrapper transformer inside the block (jeremyevans)

  • Add tr inputs_wrapper and td wrapper, for horizontal layout of inputs inside a table (jeremyevans)

  • Form#inputs now accepts transformer options (e.g :wrapper) and automatically calls with_opts (jeremyevans)

  • Remove Form#format and Form#serialize (jeremyevans)

  • Remove Form#{formatter,labeler,error_handler,wrapper,inputs_wrapper} accessors (jeremyevans)

  • Add Form.with_opts method to override opts for the given block (jeremyevans)

  • Remove Form#use_serializer and Serializer module (jeremyevans)

  • table inputs_wrapper now respects the :legend and :legend_attr options, using a caption (jeremyevans)

  • ol, div, and table inputs_wrappers now respect the :attr option (jeremyevans)

  • Make subform always use the inputs_wrapper, even if :inputs is not given (jeremyevans)

  • Allow input_defaults to work with symbol keys for inputs that use symbol types (jeremyevans)

  • Support Form :values option, for automatically setting value attributes for inputs from submitted params (jeremyevans)

  • Support :autofocus option for setting autofocus attribute, similar to :required and :disabled (jeremyevans)

  • Add Forme.default_add_blank_prompt for setting default prompt used for :add_blank option (jeremyevans)

  • Support radioset and checkboxset Input types (jeremyevans)

  • Support :key and :key_id options for Inputs, for automatically setting name/id attributes based on current namespace (jeremyevans)

  • Move namespace handling from Sequel plugin into the core (jeremyevans)

0.9.2 (2014-04-10)

  • Make association_select_options compatible with Sequel 4.10+ (jeremyevans)

0.9.1 (2013-12-18)

  • Use a tri-valued select box by default for boolean inputs with :required=>false option (jeremyevans)

0.9.0 (2013-12-13)

  • Support :input_defaults Form option for setting defaults for inputs by type (jeremyevans)

  • Make html_usa serializer convert date/datetime inputs to text for better compatibility (jeremyevans)

  • Format BigDecimal in standard notation instead of default scientific notation (jeremyevans)

  • Make trtd wrapper always have labels on left side (jeremyevans)

  • Make trtd wrapper always use 2 cells (jeremyevans)

  • Use regular (not-multiple) select box for *_to_many associations for :multiple=>false option (jeremyevans)

  • Associtions in the Sequel plugin now support a :dataset option to specify dataset to use for options (jeremyevans)

  • The :name_method option used for associations in the Sequel plugin now allows for arbitrary callables (jeremyevans)

0.8.0 (2013-10-30)

  • form calls without block or :inputs or :button options are now handled correctly in the Sinatra integration (jeremyevans)

  • CSRF token tags are now automatically added to forms in Rails and Sinatra if using rack_csrf (jeremyevans) (#5)

  • Form objects now support a :hidden_tags option for automatically adding hidden tags (jeremyevans)

  • Sequel many_to_one associations with existing and required values no longer have a blank option added by default (jeremyevans)

  • ActiveSupport::SafeBuffer objects are now automatically treated as raw in the Rails integration (jeremyevans)

0.7.0 (2012-05-02)

  • Support :label_position option in both of the labelers, can be set to :before or :after to override the default (jeremyevans)

  • Add Rails integration (jeremyevans)

  • Make explicit labeler put label after checkboxes and radio buttons instead of before (jeremyevans)

  • Make implicit labeler not include hidden checkbox inside label (jeremyevans)

  • Recognize :cols and :rows options as attributes for textarea inputs in the default formatter (jeremyevans)

  • Recognize :size and :maxlength options as attributes for text inputs in the default formatter (jeremyevans)

  • Recognize :style option as attributes in the default formatter (jeremyevans)

  • Join attribute values specified as arrays with spaces instead of the empty string (jeremyevans)

  • Make Sinatra ERB integration work with partials (jeremyevans)

  • Add id attributes for association :as=>:radio or :as=>:checkbox fields (jeremyevans)

  • Add an html class attribute for radio/checkbox labels in :as=>:radio or :as=>:checkbox fields (jeremyevans)

  • Wrap text acting as a label in a span with class label for :as=>:radio or :as=>:checkbox fields (jeremyevans)

  • Support overriding the true/false label and values for select boolean fields in the Sequel plugin (jeremyevans)

0.6.0 (2011-08-01)

  • Fix wrapping for :as=>:radio boolean fields to handle them like association :as=>:radio fields (jeremyevans)

  • Fix handling of Raw :label option in for association fields with :as=>:radio and :as=>:checkbox in the Sequel plugin (jeremyevans)

  • Use label text for :as=>:radio boolean fields in the Sequel plugin (jeremyevans)

  • Support overriding the true/false label and values for :as=>:radio boolean fields in the Sequel plugin (jeremyevans)

  • Allow overriding the type of input for schema columns and associations in the Sequel plugin (jeremyevans)

  • Add the label before the error option, so the error always comes after the label (jeremyevans)

  • Always add error class to formatted input tag, regardless of error_handler (jeremyevans)

  • Add labels to inputs for fields that the object doesn’t respond to in the Sequel plugin (jeremyevans)

  • Allow customization for non-schema columns that the object responds to in the Sequel plugin (jeremyevans)

  • Handle errors on all inputs in the Sequel plugin, not just those backed by columns (jeremyevans)

  • Fix default error_handler if input yields an area of tags (jeremyevans)

  • Support :as=>:radio option for boolean fields in the Sequel plugin (jeremyevans)

  • Allow specifying label attributes with :label_attr in labelers (jeremyevans)

  • Allow Form#inputs to be called with a single options hash argument (jeremyevans)

  • Handle unrecognized fields in the Sequel plugin if a :type option is given (jeremyevans)

  • Add required * to label even if :label is already specified in the Sequel plugin (jeremyevans)

0.5.0 (2011-07-01)

  • Initial Release