Saltcorn 0.3.5 - dynamic forms, rich content, card heights

By Tom Nielsen

Published on 08 February 2021
Here are the changes in Saltcorn 0.3.5:

  • Dynamic forms: views of the Edit view template can now be dynamic, that is, respond to changes immediately without submitting the form, in two different ways: 
    • containers can show/hide conditionally based on a formula. The formula is evaluated against the current state of the form, so if you have a drop-down or a checkbox for a Boolean, conditional containers will respond immediately. For number and text inputs, the response occurs not on every keystroke but when the input looses focus. We may be able to fix this in a future version.
    • calculated fields can be shown as live values. These are updated as with the conditional containers, immediately for drop downs and checkboxes, on loss of focus for text and number inputs. The shown calculator fields must be a field in the database table, where you have entered the formula in the definition for that calculate field.
  • Rich text editor in builder: in text elements in the builder (pages and all view templates that used the builder) text elements now have an in-line toolbar popping up when editing the contents that can be used to insert rich text content, such as styling, bullet points, horizontal rulers etc. this is based on the CKEditor 4 component. Since this was such a pleasure to work with, I have also created a plug-in based on CKEditor 4 that can be used by users in HTML fields.
  • Card heights: cards of unequal heights have long been an eyesore in Saltcorn sites. If cards are placed in a row of columns in the builder, and they all have the same width, they will now be rendered with matching heights. For feeds of cards, there is now an option to render cards with the masonry layout. This is a different solution, the cards will not have the same height, but it will remove the same eyesore in a different way.
  • Action can now be triggered from from pages. Actions can now also be specified with an icon (builder based view templates, not the list template yet)
  • Aggregations: when creating aggregations from tables that have a Date field, a new possible aggregation is the latest row by that field value. For instance, if you are logging temperatures, use this to show the latest temperature. Aggregations can furthermore be qualified by a formula.
  • The menu editor is slightly easier to use in that it no longer has a save button. Changes to the menu are automatically saved when you press update.
  • expression testing: when editing a formula for a calculated field, you can now press a Test button which will evaluate the formula is currently entered on a random row from the database.
  • Security scans: code to perform a security scan with OWASP Zed Attack Proxy is now included in the repository.

The next series of releases will focus on tables, in particular external tables, discovery of tables from existing databases, noninteger primary keys.


Comments
https://github.com/AleksandrSokolov
7 months ago

Great release. 

We need book or big tutorial with examples how to use new functional.

Because a lot of nontrivial great new things in Saltcorn.

Add Comment