We're happy to announce the latest release of form-js, our form builder and renderer. This release introduces default values for form fields. Additionally, it makes form submission more predictable; exactly what you modeled is now being submitted, no more, no less.
Form Field Default Values
This release adds the ability to specify default values for form fields. The toolkit uses default values during initial form rendering if no data for a form field exists. Unless changed or removed, it will also submit the value as the user completes the form.
Try out the new feature on our demo or using the form-js playground.
A More Predictable Submit Behavior
Previously, it wasn't entirely clear what the form would pass along during submission: Data without a corresponding form field would be submitted if passed during import, or no data would be submitted even though there was a form field.
With this release, we fundamentally reworked the form submission behavior: The toolkit now submits a value for every enabled form field, even if you did not provide an initial value. It clearly indicates missing or removed data with a null
submission. Finally, the toolkit omits data for disabled form fields and data not backed by a form field.
The improved behavior should make form submission more predictable and safe: As a user, you can rest assured that exactly what you modeled gets submitted. Modeled but missing data is appropriately represented in the submitted output, too.
Wrapping Up
Read through the full changelog to learn about all issues that we addressed with form-js@0.6.0
.
Did we miss anything? Did you spot a bug, or would you like to suggest an improvement? Reach out to us via our forums, toot us on Mastodon or file an issue you found in the form-js issue tracker.
Get the latest Forms modeling toolkit pre-packaged or as source code via npm or unpkg.
Are you passionate about JavaScript, modeling, and the web?
Join Camunda and build modeling tools people .