Thanks for the reply and it does hint at what I need but isn’t really the answer. l think I need to be more specific.
Here is what gravity forms says about adding a custom field as I would like to do it…
In order to use this hook you must do the following:
– Edit your Form
– Add a hidden field you want to populate and give it a name
– Edit the hidden field
– Select the Advanced tab
– Select the “Allow field to be populated dynamically” checkbox
– Give the field a parameter name, this parameter name is used to target the field so name it something simple like “email” or something similar.
– Save your form
Then you would use the gform_field_value hook by adding custom code in your themes functions.php file to dynamically populate that field. For example, if you set the parameter to “email” your code would look like this:
In my case I need to populate a s2member_custom_fields called “rid” as a hidden field in a form. Then I can export the data (from Gravity Forms) for all users that filled in that form within a date range. In other words, I need to add the s2member custom field “RID” for a user logged in and filling in the form. Then at a later date it will be available as one of the fields I can export.
From the old forum post, it looks like I need to pull this s2member_custom_field using MySQL REGEXP operator and it looks complicated.