Open nonprofittechy opened 1 year ago
There is another way to customize functions like name_suffix()
already--using a language update function (https://docassemble.org/docs/language.html#customizing). But that may not provide the right level of customization. Worth thinking through.
Can you describe more about what you're thinking here? What would be the purpose in passing a lambda over just a list, or the parameter to use instead?
Mainly because name_suffix()
is already a function and because the normal way to override name_suffix()
is to use a language update function. But it's not critical, those other patterns would also be fine.
Another option would be a custom list like al_name_suffixes
that can be overridden in the YAML file. Just need to figure out best option and go for it.
We had a SME suggest that some suffixes might be "Junior" or "Senior" rather than just the abbreviations. It looks like this issue was exploring ways to adjust the list of suffixes. Is this something we can revisit? Is the functionality handled elsewhere? Thanks!
It sounds like what the SME is suggesting is that we need both the long versions and the short versions together in one list. Am I misinterpreting that?
@plocket I think you're right. Ideally, the list of suffixes could be adjusted on a organization-wide or even program-by-program level. To address this specific concern, adding the full words "Junior" and "Senior" while keeping Jr, Sr, etc., would help. Thanks for asking.
We can improve flexibility of our
name_fields()
,address_fields()
etc. function by allowing a form author to pass a lambda in as a parameter to customize the various lists that we use.E.g., people sometimes want to customize the list of suffixes.
Edit 2024: instead of a lambda, it might be better to let people select from a list of choices.