Good morning. When users fill out name and address fields, sometimes they use all lowercase. I know how to change the case for a field based on type. This works great for names, but for addresses it then makes the state look like Ny instead of NY.
So I need to just do ucwords(strtolower) on address.1,.2, and .3 (street, street2, and city).
I have figured out how to change the case based on field id, but we have multiple forms that capture street addresses and I would rather not have to create this function separately for every form I have.
I do not know enough php to do this myself, but surely there is a way to check if a field type == address, get that field id, and and then replace the value only for field_id.1,field_id.2, and field_id.3? I can find many snippets of this for validation, but none for saving the value. Thank you!