You can implement a custom typeguesser that reads the doctrine metadata and checks if the field is an embeddable of the desired type. It's bad enough that it uses input type=text instead of type=number, but worse it doesn't matter what's input, like. This is a basic implementation.
The symfony moneytype field renders as input type=text which allows a user to type whatever they want into the field. In (my own) default 'en', it is set to € {{. And, indeed, you can use different names in the declaration than in the.
0 i'm working with symfony 3.4 and i'm trying to apply mask for my moneytype | numbertype field, the purpose of the mask is to act in the front to make : However, it is also affected by the locale that is set. Is there a bundle for this that provides dbal. I'm having a bit of difficulty styling a moneytype form input the way i want.
The symfony's money field is quite handy but how to map this to doctrine's column? Money_pattern is fetched within the moneytype based on the currency (so, 'eur'). Note that it doesn't even include the parameter's name. The actual definition is std::string money::asstring(bool).
What is your strategy to store monetary values with doctrine? Each moneytype should have specific value and diameter, for example cent: Value = 1 and diameter = 19, so if i assign moneytype, value and diameter should be.