Skip Navigation

[Resolved] Custom user field key for mapping Gravity Form to user

This support ticket is created 2 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2322149

I've created a registration form for subscribers on our website using Gravity Forms. The Gravity Forms User registration form allows me to map fields from the form to user meta data using the field's key. I've already done this successfully for the Restrict Content Pro plugin, mapping the subscription level for that tool using their meta key: rcp_subscription_level

I created a custom user field (a checkbox) called Credentials with Toolset. I have a corresponding checklist in the Gravity Form.

My question is what would be the correct key for "Credentials." I assume there's a naming convention where it gets a Toolset specific prefix, but I haven't been able to find this in the documentation.

I'm also aware that since it's a checkbox. I may need to map each of the checkboxes to a key for each checkbox I created in Toolset, depending on how GF and Toolset both treat checkboxes. That's fine too. Both the overall Checkbox field and individual checkboxes appear in the Value column when mapping the key to the value.

#2322573

Hello,

If the custom field is created with Toolset Types plugin, Types plugin will add prefix "wpcf-" before the field slug, in your case, it should be: wpcf-credentials, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/

However, when you are accessing custom fields through native WordPress functions, you need to prepend the wpcf- prefix to the slug. Continuing from the above example, for native WordPress function to access the “House Price” field, you need to use the wpcf-house-price slug.