When we create a webform for users to select contacts from a list whether we select to display display name or sort name it does not include suffixes. All of our contacts are families, many of which have suffixes (Sr, Jr, etc.) which makes it very hard to discern which contact is the right contact.

We have set the webform up to display the contact's full name including prefix/suffix once they select them from the list and it works ok, but it is not the slickest solution.

Is there a method to either alter what Civi includes as the sort name or display name or to alter the webform select list to include the prefix or suffix?

  • What version of Civi are you using?
    – Aidan
    Jan 26, 2017 at 22:48

3 Answers 3


Display Name and Sort Name formats are both configurable at Administer > Customize Data and Screens > Display Preferences. The default format for Display Name includes the suffix.

On a test webform with an existing contact and autocomplete showing the Display Name, the suffix is included.

  • Thanks Aidan. That does indeed work. I'd prefer to use Sort Name as it seems to be easier for folks to browse the list but this will do for now!
    – pmoz
    Jan 27, 2017 at 9:23

As I understand it, the only options available to show in the autocomplete are those listed under Contact Display Fields on the Existing Contact component ie

  • Display
  • Sort
  • First
  • Middle
  • Last
  • Current Employer
  • Job title
  • Nickname
  • Contact ID
  • External ID
  • Source
  • Email
  • City
  • District
  • State
  • Country
  • Postal Code
  • Phone

I think that getting Prefix / Suffix added would require some customisation and/or a PR (pull request) on the Webform CiviCRM module, and see if the maintener accepts it.

If you need to find a developer to help then you can check the Partners List


Another option for Drupal users would be to make a View for your 'search' and a link from that over to the webform which brings across the 'contact id' in the url eg node/xx?cid1=yy

We tend to take this approach when more complex search mechanism is required than offered via the 'autocomplete' in webform.

  • Good suggestion Pete. That's a method I implement too. I was trying to make it one step for these particular users.
    – pmoz
    Jan 27, 2017 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.