Accounts Billing & Shipping Address Fields to Dropdown

Hello All,

I think many people have already asked this question but all are not very clear that is why i’m creating this thread.

I have the Billing & Shipping Addresses both the sections in accounts. Please see the attached image below

As you can see all of the fields are open.
I want Country & States fields dropdown. And State field should be dependent on Country Field.

Can i change it to dropdown from Admin Area or i have to write code ?

What if i remove those two sections of billing and shipping and create my own custom fields. Will it be right direction ?

Please help
Thanks in advance.

Hello,
The block of address is field type of “Address” that is showing the group of individual fields in one frame.
Either you convert the Country and State field from text to dropdown by extending vardefs.
and put these all the fields in separate row.
Or You need to extend Address field type. but this will apply to the whole application for address type. and you need to extend vardefs for all the modules that have address field.

Th best approach would be:

  • to create an extended vardefs for each module which has the field address in order to convert the type of state and country from varchar to dropdown
  • to create a custom version of include/SugarFields/Fields/Address in order to modify its templates so you can render the fields accordingly.

Regards

Another not so good approach (But might solve somebody’s issues) will be to add custom drop-down fields under your module (Accounts in this case), add the list of options and finally add it to the edit view. You can use workflow or via logichooks to assign values to the standard address fields.

Thanks,
AlxGr