Package: onegov.form
Provides fields, widgets and shared form code, as well as the ability to
define custom forms using JSON. Those forms are stored on the database and
are meant to be customer defined forms.Through the web creating of forms is possible with this, but onegov.form does
not offer any UI to do that.Run the TestsInstall tox and run it:pip install tox
toxLimit the tests to a specific python version:tox -e py27ConventionsOnegov Form follows PEP8 as close as possible. To test for it run:tox -e pep8Onegov Form usesSemantic VersioningBuild StatusCoverageLatest PyPI ReleaseLicenseonegov.form is released under GPLv2Changelog0.46.6 (2019-08-06)Adds a render_display function to the form core.
[href]0.46.5 (2019-07-17)Fixes label escapes turning translatable into untranslatable strings.
[href]0.46.4 (2019-07-02)Adds compatibility with py.test 5.x.
[href]0.46.3 (2019-07-02)Fixes missing fields being submitted to the backend after field selection.
[href]0.46.2 (2019-05-01)Adds image preview support to the file upload widget.
[href]Adds a timezone-aware datetime field.
[href]0.46.1 (2019-04-22)Fixes chosen selects not working properly with dependencies.
[msom]0.46.0 (2019-04-10)Improves parser import times.
[href]0.45.1 (2019-04-03)Support latest onegov.search release.
[href]0.45.0 (2019-02-21)Adds the ability to enforce a required field on a form definition.
[href]0.44.1 (2019-02-20)Fixes string field display chocking on non-string values.
[href]0.44.0 (2019-01-31)Adds a InputRequiredIf validator.
[msom]0.43.0 (2019-01-31)Adds a unique column value validator.
[msom]0.42.0 (2019-01-28)Adds the ability to use iframes in preview widgets.
[href]Adds new ‘typing’ event to preview widgets.
[href]0.41.4 (2019-01-21)Refactors upload widget slightly to improve access to uploads.
[href]0.41.3 (2019-01-16)Fixes choices in form displays not being translated.
[href]0.41.2 (2019-01-14)Adds compatibility with pyparsing 2.3.1.
[href]0.41.1 (2019-01-11)Fixes preview not working in IE11.
[href]0.41.0 (2019-01-11)Adds a preview field for AJAX previews inside forms.
[href]0.40.1 (2018-11-27)Fixes onegov.form parsing no longer working as expected.The latest pyparsing release changed some things.
[href]0.40.0 (2018-10-25)Adds chosen select fields.
[msom]0.39.2 (2018-10-18)Fixes wrong content_type being created when uploading files with ORM support.
[href]0.39.1 (2018-10-18)Fixes a few issues with UploadFileWithORMSupport.
[href]0.39.0 (2018-10-18)Adds UploadFileWithORMSupport, an upload field with onegov.file support.
[href]0.38.0 (2018-10-08)Uses the yubikey identity function from the core.
[href]0.37.0 (2018-09-19)Adds a phone number field.
[msom]0.36.0 (2018-09-18)Adds a phone number validator.
[msom]0.35.0 (2018-09-12)Adds a markdown field to the form syntax.
[href]0.34.0 (2018-08-20)Adds an icon field to select icons from iconsets.
[href]0.33.6 (2018-06-22)Fixes field selection not being reflected when the fields are reodered.
[href]0.33.5 (2018-06-21)Parses options using newlines instead of commas.
[href]0.33.4 (2018-06-21)Properly escapes single/double quotes in formcode.
[href]0.33.3 (2018-06-04)Adds compatibility with WTForms 2.2.
[href]0.33.2 (2018-06-04)Pin WTForms to < 2.2 as the latest release breaks a lot of our code.
[href]0.33.1 (2018-03-30)Adds payable_reference property to submissions.
[href]0.33.0 (2018-03-29)Adds the ability mark fields as shown/hidden.
[href]Adds the ability to define registration windows for forms.
[href]0.32.0 (2018-02-21)Adds the ability to attach a group to each form definition.
[href]0.31.2 (2018-02-06)Fixes invalid variable reference.
[href]0.31.1 (2018-02-05)Fixes validators of depndent fields being invoked for empty values when
they should not.
[href]0.31.0 (2018-01-24)Adds an Optional validator that does not ignore “data” and defaults to it.
[href]0.30.0 (2018-01-17)Adds a tags input field.
[href]0.29.0 (2017-12-29)Adds the ability to provide an e-mail address when creating a submission.
[href]Adds the ability to extend form classes generated by definitions/submissions.
[href]Sets minimum requirement to Python 3.6.
[href]Adds a meta column to the submissions table.
[href]0.28.0 (2017-12-19)Denormalises the payment_method from forms <-> submissions. A change in
a form’s payment method no longer has an impact on existing submissions.Also, external submissions can now have a payment method.
[href]0.27.0 (2017-12-15)Gathers often used field filters in onegov.form.filters.
[href]0.26.4 (2017-11-30)Fixes complex file input field not working as required field.
[href]0.26.3 (2017-11-08)Fixes submission title containing html.
[href]0.26.2 (2017-11-08)No longer limit the set of availble file upload extensions.
[href]0.26.1 (2017-11-08)Renders e-mail addresses and websites as clickable links.
[href]0.26.0 (2017-11-07)Adds support for radio input parsing.
[href]Automatically ignores the part after the dot when parsing integers.
[href]0.25.0 (2017-11-03)Adds basic field value parsing as a helper for import methods.
[href]Fixes order not being preserved in the select component.
[href]0.24.0 (2017-10-26)Adds various javascript tools to work with formcode.
[href]Adds basic formcode parsing through a REST interface.
[href]Introduces an additional human-readable field id for parsed fields.
[href]0.23.0 (2017-10-19)Adds a formcode snippet insertion script written in React.
[href]Adds an ‘is_image’ property to upload fields.
[href]0.22.0 (2017-09-26)Switches to onegov.search’s automatic language detection.
[href]0.21.0 (2017-09-22)Moves from the custom form submission file model to a onegov.file based one.This improves the performance of serving files and makes sure that a
unified approach is used across multiple onegov modules.
[href]Adds french translation.
[href]Moves the binary as dictionary encoding to onegov.core.
[href]0.20.0 (2017-08-31)Adds an url field.
[href]Adds the ability to define a validation regex for text fields.
[href]Adds integer and decimal ranges (age = 1..99, percentile = 0.00..100.00).
[href]0.19.1 (2017-08-24)Adds the field id to the intermediate representation.
[href]0.19.0 (2017-08-23)Adds an intermediate representation of parsed formcode.
[href]0.18.0 (2017-07-11)Adds a HTML field.
[msom]0.17.1 (2017-06-23)Stops non-pricing text in parentheses from being ignored.
[href]0.17.0 (2017-06-16)Adds the ability to price radio and checkbox fields.
[href]0.16.3 (2017-01-26)Stops the upload widget from looking successful when there are errors.
[href]0.16.2 (2016-12-28)Adds the ability to supply a custom field_id to the formbuilder.
[href]0.16.1 (2016-12-23)HTML escapes labels in the dynamic formbuilder for security.
[href]0.16.0 (2016-12-06)Adds the ability to define ensure_* functions on forms which get called
automatically by the validate function.
[href]0.15.2 (2016-10-10)Adds a process_obj function which may be overridden by forms that need
to change the way objects are processed.
[href]0.15.1 (2016-10-06)Make sure that empty fieldsets are cleaned up when a field is deleted.
[href]0.15.0 (2016-09-23)Adds an ordered multi checkbox field.
[href]0.14.0 (2016-09-09)Adds the ability to move in a form class.
[href]0.13.0 (2016-08-30)Adds the ability to delete fields from forms/all fieldsets.
[href]0.12.1 (2016-07-06)Adds compatibility with python-magic 0.4.12.
[msom]0.12.0 (2016-06-10)Adds new options on how to dependen on a field value.It’s now possible to depend on NOT a specific field value and to depend on
more then one fields (AND).
[msom]0.11.2 (2016-05-11)Exclude pyparsing 2.1.2 from the list of possible versions.It doesn’t work together with python 3.3 and 3.4.
[href]0.11.1 (2016-04-14)Ignores depends_on argument to fields if it is set to None.
[href]0.11.0 (2016-04-13)Adds the ability to block reserved field names with the validator.
[href]Adds the ability to exclude certain fields from the submission update.
[href]0.10.2 (2016-04-11)Stops escaping strings in the submission title (that’s the frontends job).
[href]0.10.1 (2016-04-01)Properly include lead/text as properties.They were basically there already and other code counted on this being so.
[href]0.10.0 (2016-03-24)Improves wtform’s populate_obj by adding include and exclude filters to it.
[href]Moves map related code (like the coordinates field) to onegov.gis.
[href]Adds the ability to merge multiple forms together while keeping the field
order predictable.
[href]0.9.0 (2016-03-23)Makes it simpler to add a dependent field through Python code.
[href]Adds a field representing coordinates (lat/lon).
[href]0.8.6 (2016-03-17)Fixes unexpected indentation detection not working correctly.
[href]0.8.5 (2016-02-02)Marks fields which contain labels as such, so the field rendering code can
avoid generating nested labels.0.8.4 (2016-01-28)Uses the latest onegov.core release to get rid of some code.
[href]0.8.3 (2015-11-26)Adds an error message if no actual field was defined in a definition.
[href]0.8.2 (2015-11-18)Adds an error message if the form indentation is wrong.
[href]Adds an error message for duplicate labels.
[href]Fixes fieldsets only showing up once on static forms.
[href]0.8.1 (2015-10-15)Use ‘de_CH’ translation instead of ‘de’
[href]0.8.0 (2015-10-12)Removes Python 2.x support.
[href]0.7.3 (2015-10-08)Adds the ability to force the UploadWidget to show no special options.
[href]0.7.2 (2015-10-05)Adds German translations, no more defining those outside the package.
[href]0.7.1 (2015-09-25)Adds onegov.search integration for form definitions.
[href]0.7.0 (2015-09-10)Fixes an error where optional fields had to be filled out.
[href]Adds rudimentary syntax checking with information about which line wrong.
[href]0.6.9 (2015-08-28)Adds the ability to specifiy the submission id manually.
[href]Adds the ability to pass a custom base class to the parse_form function.
[href]0.6.8 (2015-08-26)Adds an easier way for the often used “check if there’s a required e-mail”.
[href]Adds the ability to add submissions whose form definitions are external.
[href]0.6.7 (2015-08-18)Adds a new widget for multiple checkbox fields.
[href]0.6.6 (2015-08-11)Fixes installation issue with pip.
[href]0.6.5 (2015-07-13)Fix expired submission removal not working if files had been uploaded.
[href]0.6.4 (2015-07-09)The default form definition validator now checks that there’s at least one
required E-Mail field.0.6.3 (2015-07-02)Adds a method to get all useful data from a form.
[href]Use content/meta defined in onegov.core.
[href]0.6.2 (2015-06-26)Remove accidentally left in upgrade test code.
[href]0.6.1 (2015-06-26)Adds support for onegov.core.upgrade.
[href]Remove support for Python 3.3.
[href]0.6.0 (2015-06-10)Compress files using gzip instead of zlib, as the former is better supported.
[href]Change the submission complete method, ensuring the right polymorphic
instance is returned afterwards.
[href]Make sure the received date is only set once.
[href]0.5.4 (2015-06-10)Adds a helpfulhas_submissionsfunction on the form definition model.
[href]Automatically delete pending submissions when removing a definition.
[href]0.5.3 (2015-06-10)Adds a function to retrieve form definitions together with the number of
complete submissions.
[href]0.5.2 (2015-06-09)Adds a ‘received’ field to the submissions which contains the time at which
the submission was received.
[href]Adds an email and a title field to the submission.
[href]Adds the ability to scope a submission collection to a specific form.
[href]0.5.1 (2015-06-08)Store all information, even invalid one, to avoid accidentally throwing
away error information.
[href]Fixes time field triggering an error.
[href]0.5.0 (2015-06-05)Adds averysimple form syntax parser.
[href]Fixes password field not working.
[href]Uses the right class for form-definitions depending on the type.
[href]0.4.1 (2015-06-03)Stores a checksum with each form definition and submission.
[href]Adds the ability to filter out submissions older than one hour.
[href]0.4.0 (2015-06-03)Moves the uploaded files to their own table.
[href]0.3.1 (2015-06-02)Fixes unicode error in Python 2.7.
[href]0.3.0 (2015-06-02)Adds the ability to render fields for html output (without input elements).
[href]Adds the ability to upload files without losing them if the form has an
unrelated validation error.
[href]Divides the submissions into ‘pending’ and ‘complete’.Pending submissions are temporary and possibly invalid. Complete submissions
are final and always valid.[href]Compresses uploaded files before storing them on the database.
[href]Limits the size of uploaded files.
[href]No longer stores the csrf_token with the form submission.
[href]Adds a file upload syntax.
[href]Show the ‘required’ flag, even if the requirement is conditional.
[href]0.2.3 (2015-05-29)Fix unicode errors in Python 2.7.
[href]0.2.2 (2015-05-29)Make sure special fields like the csrf token are included in the fieldsets.
[href]0.2.1 (2015-05-28)Makes sure multiple fields with the same labels are handled more
intelligently.
[href]0.2.0 (2015-05-28)Rewrites most of the parsing logic. Pyparsing is no longer used for
indentation, instead the form source is transalted into YAML first, then
parsed further.This fixes all known indentation problems.[href]0.1.0 (2015-05-22)Adds the ability to store forms and related submissions in the database.
[href]Adds a custom markdownish form syntax.Seehttp://onegov.readthedocs.org/en/latest/onegov_form.html#module-onegov.form.parser.grammar[href]0.0.1 (2015-04-29)Initial Release [href]