Skip to content

Multiline must use regular UI/PHP controls #810

Open
@PhilippGrashoff

Description

@PhilippGrashoff

Hi,
I am using multiline with containsMany, and thats just a great combination!
Using a money field, I noticed two things in this combination:

  1. In normal Form Fields, Money fields do get rendered with number_format, always displaying 2 digits after the dot (e.g. 25.90). This currently does not happen in multiline. It seems that Persistence\UI in not involved for rendering field values.
  2. When saving the data, the typecasting/normalization that takes place in normal form fields does not seem to happen.
    When I save a normal money field with an input like 25,90 (notice the comma as separator), this is saved as 259 in persistence.
    With Multiline and containsMany, the original value 25,90 is saved in the json encoded data.

I think its important to have Multiline form fields to behave as much as possible like normal form fields (which won't always be 100% possible as a different JS library is used for multiline fields). But these cases are Server Side only and shouldn't be too hard to implement.
Making sure that data "flow" is the same for each form field (whether its a normal form field or a multiline field) will prevent some bad surprises :)

And: Many thanks for all the work you put in there Alain!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions