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.

Registering a custom user taxonomy?

  1. bostondave
    Member

    I am building a registration form for a non-released website and I am trying to connect GF to a custom user taxonomy. I can get the taxonomy to dynamically populate using the custom post type add on and it shows up on the form but it does not populate the data on submit.

    If my taxonomy name is registered as "skill", should I use a merge field {user:skill}?

    My method for registering a custom user taxonomy was taken from the example on this page - it is basically registering a taxonomy to a user and not a post.
    http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress

    Posted 11 years ago on Tuesday July 10, 2012 | Permalink
  2. Hi Dave,

    When you say that it does not populate on submit, do you mean that the submitted data is not applied to user taxonomy for the user in question? If so, you will likely need to hook into the gform_user_registered hook and apply some custom functionality to apply the submitted form data to the user taxonomy for that user. The custom functionality will be based on the "Assigning terms to users" section of Justin's article you linked to above. This piece in particular will do most of what you need:

    [php]
    wp_set_object_terms( $user_id, array( $term ), 'profession', false);

    More info here: http://www.gravityhelp.com/documentation/page/Gform_user_registered

    Posted 11 years ago on Monday July 16, 2012 | Permalink
  3. Hi Dave, take a look at this solution:
    http://wordpress.org/support/topic/plugin-gravity-forms-custom-post-types-custom-user-taxonomies?replies=3#post-3038896

    Kind regards, Mark

    Posted 11 years ago on Friday August 3, 2012 | Permalink
  4. Looking good Mark! Thanks for sharing. :)

    Posted 11 years ago on Friday August 3, 2012 | Permalink

This topic has been resolved and has been closed to new replies.