You would have to add some code to a CFDB hook to grab a form submission when it arrives and save data in the profile. See: http://cfdbplugin.com/?page_id=747
Alrighty! I think this would be a smoother solution to one of my previous issues aswell, regarding viewing database entries for specific entries seemingly untied to one’s user account. Would this sort of code work for example?
// My form filter
function myFilter($formData){
$formName = 'testform'; // change this to your form's name
// Can I set up alot of what-ifs like this?
if ($formData->posted_data['group']->group-a) {
$formData->posted_data['leader'] =
//Sorry for the following brutal make-belief line. Regards, non-techy. I want the following line to print a registered user with a user profile field named user_leader_of that reads exactly the same as the submission in ['group'], in this case group-a.
(%user_leader_of% == group-a)
return $formData;
}
add_filter('cfdb_form_data', 'myFilter');
Like, is there an action that can fetch a line from a user profile, checking whether a submitted field in the cf7 form corresponds to a field in a user profile. If doable, this would make it so much cleaner for me, if the form could automatically create this field in the background, so that a user with user_leader_of set to group-a can then navigate the db with correct rights.
$formData->posted_data['group'] will be a string not an object, so the ->group-a syntax will not work. I don’t follow your intent. Maybe you mean == 'group-a' ?