Title: vingstaf's Replies | WordPress.org

---

# vingstaf

  [  ](https://wordpress.org/support/users/vingstaf/)

 *   [Profile](https://wordpress.org/support/users/vingstaf/)
 *   [Topics Started](https://wordpress.org/support/users/vingstaf/topics/)
 *   [Replies Created](https://wordpress.org/support/users/vingstaf/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/vingstaf/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/vingstaf/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/vingstaf/engagements/)
 *   [Favorites](https://wordpress.org/support/users/vingstaf/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Show db values in user profiles](https://wordpress.org/support/topic/show-db-values-in-user-profiles/)
 *  Thread Starter [vingstaf](https://wordpress.org/support/users/vingstaf/)
 * (@vingstaf)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/show-db-values-in-user-profiles/#post-8488196)
 * 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.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor] Hiding fields for subscribers](https://wordpress.org/support/topic/hiding-fields-for-subscribers/)
 *  Thread Starter [vingstaf](https://wordpress.org/support/users/vingstaf/)
 * (@vingstaf)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/hiding-fields-for-subscribers/#post-8487963)
 * Alright, that clears up confusion. I’d however suggest rephrasing, to something
   along the lines of “Select which profile fields users can fill in/modify”, as“
   see” would imply that you can chose which ones the users also can not see, which
   would be a hidden field.
 * Great plugin either way, and thanks for support 🙂
 * Regards,
    Erik
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Showing different parts of database to different people](https://wordpress.org/support/topic/showing-different-parts-of-database-to-different-people/)
 *  Thread Starter [vingstaf](https://wordpress.org/support/users/vingstaf/)
 * (@vingstaf)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/showing-different-parts-of-database-to-different-people/#post-8479880)
 * `filter="dropdown-of-group-leaders=$user_login"`
 * I added this thing to my code, and it actually worked! As someone who knows little
   about PHP, this saves me some headache. Thanks a bunch again Michael, for this
   plugin and for your helping efforts.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Showing different parts of database to different people](https://wordpress.org/support/topic/showing-different-parts-of-database-to-different-people/)
 *  Thread Starter [vingstaf](https://wordpress.org/support/users/vingstaf/)
 * (@vingstaf)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/showing-different-parts-of-database-to-different-people/#post-8479796)
 * Hm, how about I add an extra field in the form requiring them to select the name
   of the leader of the group?
 * The leader, John Doe, of Group A, is signed up as John Doe.
    10 people sign up
   and choose Group A from a drop-down for the name of the group, and they choose
   John Doe from a (manually text-filled) drop-down for the name of the leader.
 * Would something like %user_thingy% (however the format is) be able to find and
   understand that extra column and identify the drop-down “John Doe” as the leader
   user’s login name?
 * I hope my thinking’s made clear here haha. My thinking is that John Doe then 
   should be able to view all entries in the database where he’s been chosen as 
   the group leader upon signup.

Viewing 4 replies - 1 through 4 (of 4 total)