You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My "problem" is described in this thread on DW user forum.
Basically, we need a way to force leading zeroes for numbers (similar to how the Data plugin would support this).
Our users use a Bureaucracy form where they need to input a number in one of the fields. They can enter whatever number from 0 to 999999. However, we need the number to be a 6-digit number. So for now we solved this by using the parameter "000000" in the Bureaucracy form, for the Number field. User input is automatically converted into a 6-digit number by adding leading zeroes.
However, when switching from Data to Struct. This no longer works. The "000000" parameter in the form has no effect.
We used the type "decimal" for the number in the Struct schema (since there isn't a "number" type) [[EDIT: and tweaked it to accept 0 decimals (roundto=0) 20240508: Actually I realized that's not what roundto does. Roundto rounds the value entered by the user to what the parameter defines and displays that in the aggregation table. Here if the user enters 11.6, the number displayed in the table would be 12. but the value for "number" would still be 11.6 /EDIT]].
Any chance to implement this feature? Otherwise could you give me some advice about how to achieve this differently?
Thank you very much :)
-a-
The text was updated successfully, but these errors were encountered:
Feature Description
Hi :)
My "problem" is described in this thread on DW user forum.
Basically, we need a way to force leading zeroes for numbers (similar to how the Data plugin would support this).
Our users use a Bureaucracy form where they need to input a number in one of the fields. They can enter whatever number from 0 to 999999. However, we need the number to be a 6-digit number. So for now we solved this by using the parameter "000000" in the Bureaucracy form, for the Number field. User input is automatically converted into a 6-digit number by adding leading zeroes.
However, when switching from Data to Struct. This no longer works. The "000000" parameter in the form has no effect.
We used the type "decimal" for the number in the Struct schema (since there isn't a "number" type) [[EDIT: and tweaked it to accept 0 decimals (roundto=0) 20240508: Actually I realized that's not what roundto does. Roundto rounds the value entered by the user to what the parameter defines and displays that in the aggregation table. Here if the user enters 11.6, the number displayed in the table would be 12. but the value for "number" would still be 11.6 /EDIT]].
Any chance to implement this feature? Otherwise could you give me some advice about how to achieve this differently?
Thank you very much :)
-a-
The text was updated successfully, but these errors were encountered: