PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Custom Display name from compound custom field

  1. Now that I have a custom compound Name field working ( see ), I need to be able to use this information to create a custom option in the Display Name drop down on the Feed Settings page. I've looked at the gform_merge_tags filter, but that seems to apply only to the Form Editor.

    I can't see any hooks that would let me modify $display_names in userregistration.php, and furthermore I'm not sure how I would go about having it pull the necessary info from my compound full name field.

    Once I get this part sorted, I'm thinking of putting together a little tutorial if there's interest.



    Posted 6 years ago on Monday April 8, 2013 | Permalink
  2. I'll send this one to the development team for you as well.

    Posted 6 years ago on Tuesday April 9, 2013 | Permalink
  3. The User Registration add-on has the options for display name hard-coded to only be choices of:

    'username' => '{username}',
    'firstname' => '{first name}',
    'lastname' => '{last name}',
    'firstlast' => '{first name} {last name}',
    'lastfirst' => '{last name} {first name}'

    to match what WordPress does.

    You will need to have your compound field show up in the drop down for first name or last name. The display name drop down options refer to the other fields on the page, not form fields. So they could put their compound field (full name) into the first name field and then set display name to {first name}, like my screen shot here: .

    Does that information help?

    Posted 6 years ago on Wednesday April 10, 2013 | Permalink
  4. Perhaps....

    I suppose I could add a hidden form filed called 'first name', that's populated dynamically via js to assemble a display name from the individual components... but then I lose the first name... or rather, first name wouldn't be first name any more.

    I'm going to have to play with this, someday when I don't have a crazy deadline looming. At this point, the issue is too trivial for me to waste time on getting hacky with it.

    If I find something useful, I'll report back... meanwhile, feel free to close this.

    Thanks for the help!


    Posted 6 years ago on Thursday April 11, 2013 | Permalink
  5. Thank you. I'll leave it open in case you're inclined to update this topic in the future with your solution.

    Posted 6 years ago on Sunday April 14, 2013 | Permalink