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.

Using checkbox to populate user meta field

  1. I have a user registration form with a hidden checkbox for 'Account Type' that is populated dynamically via a url string from a previous page. The values are 'School', 'Organization' and 'Local Business'.

    I'm trying to map the selected checkbox value to a user meta field and can't seem to figure out how. On the Edit Feed screen, I can create the Account Type field under User Meta and map that to a field but it is not saving the value (the field is blank in the user profile). I've registered the field in functions.php as per this: http://chriscarter.org/removing-and-adding-meta-fields-from-profile/

    Now, this may or may not be related but certain user meta fields I'm creating using User Meta Pro are showing up as available to be mapped but some are not and I don't know why.

    Alternatively I could use a hook/filter to accomplish this but how can I get (or create) the meta key for a custom user registration form field and then map that to a user meta field?

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  2. Have you tried this without the User Meta Pro plugin active? Also, what versions of Gravity Forms, WordPress and User Registration add-on are you using, and are you using BuddyPress?

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  3. Latest versions of all and not using BuddyPress. Yep just tried without User Meta Pro and no difference.

    For example, previously I created a new custom user meta field for Mobile Phone with a meta key of fg_mobile_phone. In the GF User Registration feed, I can map a Phone field from a form to that user meta field. It shows up in the field with the meta key name so I can map to it.

    But, I created a field yesterday in User Meta Pro for organization name: fg_org_name and I can get it to show in the User Profile edit screen but it is not available to be mapped by GF at all. As far as I know, I created this field in exactly the same way.

    There's a bunch of other fields that I've created with UMP and they are all showing up, but as of yesterday new user meta fields do not seem to be. Since I created the older user meta fields there *has* been a GF update but not a UMP update although don't know if that could be the issue.

    Thanks Chris.

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  4. Latest 1.4 version of the User Registration add-on, or the 1.5beta?

    Can you see if there are meta keys in the $wpdb->usermeta table for any of these values?

    And, can you successfully add any of the data when editing the user's profile, but just not when mapping the fields to the Gravity Form?

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  5. Hi Chris,

    I'm using the UR Add-on 1.5beta1.

    Just tried saving data in the user profile and lo and behold it is *not* saving. So, these must not be getting registered correctly with User Meta Pro...

    I can code them manually in functions.php and see if that works (and see if they show up to be mapped by GF).

    Very strange.

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  6. I have a newer version of the beta which you can use instead of the beta you have currently. More bugs have been fixed and maybe this will work. Please send an email to chris@rocketgenius.com if you would like a copy. Refer to this topic in your email please.

    Posted 11 years ago on Saturday February 9, 2013 | Permalink
  7. Hi Chris,

    This was an issue with UMP - I guess when I last upgraded that a few files were not overwritten. I re-uploaded the updated plugin and all is well.

    Good to know I wasn't going mad :)

    If I run into any more issues I will hit you up for the beta but all is working now.

    Thanks.

    J

    Posted 11 years ago on Monday February 11, 2013 | Permalink
  8. Glad to hear it. Thanks for the update.

    Posted 11 years ago on Monday February 11, 2013 | Permalink
  9. Just an additional update in case anyone else comes across a similar issue using User Meta Pro:

    If you create a new field in User Meta Pro, you have to first save a value into one of those fields in a User Profile before the Gravity Forms User Registration Add-On will see it.

    So, it might be a good idea to have a test user where you can save data into new fields that you create with UMP. Once you have done that, those fields will show up by meta_key name in your User Registration feed to be mapped to your GF fields.

    This isn't particularly intuitive.

    Posted 11 years ago on Tuesday February 12, 2013 | Permalink
  10. Thanks for sharing that.

    Posted 11 years ago on Wednesday February 13, 2013 | Permalink