Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter stephfd21

    (@stephfd21)

    Nevermind, ended up writing the code for it

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @stephfd21,

    You can use our below serach short-code to get the records according to the users.

    [acf7db form_id=’2,3′ search=’[email protected]’]

    The above will display all the records from form 2 & 3.

    You will need to place the dynamic value(email) in the search term for the users related data.

    Hope this helps you.

    Regards,

    Thread Starter stephfd21

    (@stephfd21)

    Not what I wanted, I want the ability for the current logged in user to see their submitted form content. Anyhow, I wrote the code to solve this. Thanks for replying though..

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Currently you can try the below code, by placing in your template

    <?php
    $short = ‘[acf7db form_id=’2,3’ search=”‘.$user_email.’”]’;
    echo do_shortcode($short);
    ?>

    Regards,

    Hi #stephfd21,
    Can you share the code, please

    @stephfd21 can you write here the correct code please. Thanks.

    @vsourz1td this code does not work for me.

    <?php
    $short = ‘[acf7db form_id=’My id Code’ search=”‘.$user_email.’”]’;
    echo do_shortcode($short);
    ?>

    I rewrote the code and I solved. Thanks.

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @calle81 & @stephfd21,

    We appreciate you that you both have found the solution to this. By the way, below is the complete code to achieve the functionality for the users to view their own data.

    The below code will be needed to be pasted in the pages after the user has been logged In to your site else it will not work.

    <?php
    $user = wp_get_current_user();
    $user_email = $user->user_email;

    $short = ‘[acf7db form_id=’My id Code’ search=”‘.$user_email.’” show=’your-name, your-email, age’]]’;
    echo do_shortcode($short);

    ?>
    In above ‘My form id’, will be the contact form Id for the users, which are submitting the form.

    Hope this will help all our user’s who are looking out for such type of functionality.

    Regards,
    Vsourz

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Kindly find the updated code as below.

    <?php
    $user = wp_get_current_user();
    $user_email = $user->user_email;
    
    $short = '[acf7db form_id="My id Code" search="'.$user_email.’” show="your-name, your-email, age"]';
    echo do_shortcode($short);
    
    ?>

    in my case my I want the user to enter their email in a text box ,and only the data related to the corresponding email must be shown ,is there any way i could do it,………… im new to wordpress i don’t know much about it so please help me

    <form method=”post” >
    <input type=”email” name=”email”>
    <input type=”submit” value=”click” name=”submit”>
    </form>
    <?php
    echo $_POST[’email’];
    $short = ‘[acf7db form_id=”240″ search=”‘.$email.'” ]’;
    if(isset($_POST[‘submit’]))
    {
    echo do_shortcode($short) ;
    }
    ?>
    Whats Wrong with this code it shows all the records

    • This reply was modified 6 years, 2 months ago by dinaarshith.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Show user their own submission’ is closed to new replies.