I want to submit my input field to certain condition:
Value has to be > 0, maximum 2 decimals and has to be a currency.
Description has to be defined as text and can only consists of 30 characters.
Is it possible to define a new ‘format’ (same as integer, currency is defined now) for which these conditions applies (eg. value and description) and define this as a result and afterwards define input fields in different templates as below?
in a similar way you could have the description as a field that you can type whatever you want, but in the export you only show the first 30 characters, for example:
{% ic %}{% input custom.some.thing %}{% endic %}{% nic %}{{ custom.some.thing | truncate: 10, "" }} {% endnic %}
We are investigation to add certain options to the input (for example, precision, I’ll add ‘length’ to the list to consider).
Can you specify the exact scenario you need this for? Maybe I can come with a better solution?
We need this because certain input fields in biztax can only contain positive values. In addition they can only have 2 decimals but I understood from Timothy that if you export the tax return the values defined as currency are rounded at 2 decimals.
For text inputs biztax accepts only 30 characters that’s why I wanted to limit the input fields but your solution will work as well. In addition biztax does not accept ‘exotic characters’ (eg. à, ç, &, é ,@,…). Do you have any solution to prohibit the input of these characters or to limit the export?