PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

user submitted forms using wordpress

  1. Ok, I am curious if GF does this. I have a gravity form in my php code so it shows up on every post that was posted by the registered user (Author).

    Its a Lead form. So, how I want it to work is this:

    - Registered users logs into wordpress and creates a post and publishes it. The form is already coded in the php file, so when you publish the post the form is already there.

    - The front end user goes to the post and fills out form and submits it.

    What I want to happen is this:

    When the front-end users submits the form, I want the registered user that posted the post that the form is on to be the only one that can see the form in the admin panel that was submitted by the front end user. I don't want all registered users to see the submitted form.

    Does GF have a way that this does this. It seems simple but I am not sure. I just want the registered user to be able to see the from info that was submitted in the admin section.

    I already created a custom post type for the info to be posted in the Admin section.

    Any help. If this is something that GF already does great but it not, here is some code I am trying to see if it would work in Custom Post Type

    global $wpdb;

    $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s AND post_title = post_title", $user_login));

    $sql = SELECT * FROM wp_rg_lead_detail ORDER BY lead_id WHERE lead_id = $key

    $data = $wpdb->get_results($sql, ARRAY_A);

    Posted 11 years ago on Tuesday September 11, 2012 | Permalink
  2. Ok, I am curious if GF does this. I have a gravity form in my php code so it shows up on every post that was posted by the registered user (Author).

    So you have the function call embedded in your template. That's fine.

    Its a Lead form. So, how I want it to work is this:

    - Registered users logs into wordpress and creates a post and publishes it. The form is already coded in the php file, so when you publish the post the form is already there.

    OK

    - The front end user goes to the post and fills out form and submits it.

    OK

    What I want to happen is this:

    When the front-end users submits the form, I want the registered user that posted the post that the form is on to be the only one that can see the form in the admin panel that was submitted by the front end user. I don't want all registered users to see the submitted form.

    I think you mean "submitted entry" not "submitted form" or "form" here.

    You can control the roles so that all registered users do not have access to form entries. You can make it so only editors and administrators can see form entries. However, you cannot restrict a specific entry to be viewable by a specific user. The permissions are not that granular in WordPress or Gravity Forms.

    Does GF have a way that this does this. It seems simple but I am not sure. I just want the registered user to be able to see the from info that was submitted in the admin section.

    See above. The permissions are such that the registered user can see entries or not, not specific entries, and not entries for a specific form and from a specific user.

    I already created a custom post type for the info to be posted in the Admin section.

    OK

    Any help. If this is something that GF already does great but it not, here is some code I am trying to see if it would work in Custom Post Type

    This is not something that Gravity Forms or WordPress will do.

    [php]
    global $wpdb;
    
    $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s AND post_title = post_title", $user_login));
    
    $sql = SELECT * FROM wp_rg_lead_detail ORDER BY lead_id WHERE lead_id = $key
    
    $data = $wpdb->get_results($sql, ARRAY_A);

    You might be able to create a page to pull specific entries, then restrict access to that page by user. Then turn off the ability to view all form entries. This would be a customization beyond the support we can provide in these forums. I do not know of anyone who has done this yet, and it's not a feature of Gravity Forms.

    Posted 11 years ago on Wednesday September 12, 2012 | Permalink
  3. Thank you for your help and response. One last simple question? If GF and WP can not do it, is it something that can be done written in its own php file using an "if else" statement.

    So I would create a file out side of wordpress theme with its own table in mysql and calling from the database to display info for that user?

    Posted 11 years ago on Wednesday September 12, 2012 | Permalink
  4. You can do anything you like with direct database access and PHP. You can even use some of the built in Gravity Forms functions. It would be a customization, not a particularly difficult one, but will require some work to accomplish. It's possible though.

    Posted 11 years ago on Friday September 14, 2012 | Permalink