Registering user via GravityForms, adding fields to s2member_custom_fields... via metadata

I created a register gravity form, that uses the addon- Register User…

Anyhow, I am setting it up, where the people can fill out the fields that are also custom fields.

I am trying to match them up, but there are not any of the custom fields, but I do have the values and the ability to add custom meta data.

So my question is, is there a way to set custom meta data in wp and it set the s2member custom fields?

like I have a custom field that is, say:
so that is the Business Name.

So could I set the metadata as:

biz_name = (then put the value they entered on the gravity form for that field)…

? Does that break it, or does it work?

(I tested it, it did not work…)

is there a way that you know?
Also, is there a way to create a webhook for when someone registers through S2Member?
I could just do it that way…

Yes, you can set metadata for s2Member like this. But what you need to bear in mind is that s2Member does not use simple data pairs of meta key and meta value. Instead, it stores data in a serialized array. I suspect that’s why what you have tried isn’t working.

I changed how I did it. I have the form generate a key, then after they submit it, I pass that key along with all the data they submitted through a page, I have it check the key that was sent, if it is changed, then it won’t do anything, if it was sent through the form automatically, so not hacked, then it will take the data they sent and use update_user_option($user_id, ‘s2member_custom_fields’, $custom_fields) code to update the data.

I tested it, and it worked perfectly, so I got around the need, because I could not get it to work. So this works great.

Hey Bizactuator, how can be passed gravity form into S2membership at subscriber level?