SuffolkLITLab / docassemble-AssemblyLine

Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
MIT License
37 stars 5 forks source link

Let people specify long version of suffixes, replace other option lists by passing parameter to name_fields() method #657

Open nonprofittechy opened 1 year ago

nonprofittechy commented 1 year ago

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.

nonprofittechy commented 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.

BryceStevenWilley commented 1 year ago

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?

nonprofittechy commented 1 year ago

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.

mnewsted commented 5 months ago

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!

plocket commented 2 months ago

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?

mnewsted commented 2 months ago

@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.