Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author sevenspark

    (@sevenspark)

    You’re welcome! I’m currently looking into this and I’ll post back when the update is complete.

    Plugin Author sevenspark

    (@sevenspark)

    The latest release, version 1.0.3, now contains shortcodes to perform this function. The CF7_get_post_var shortcode can retrieve any value from the $post object. Some options are:

    – title (or post_title)
    – slug (or post_name)
    – ID
    – post_date

    Example:

    [dynamictext dynamicname "CF7_get_post_var key='title'"]

    Other new shortcodes include CF7_POST (for the $_POST array) and CF7_URL (gets the URL of the current page).

    Thread Starter andycahn

    (@andycahn)

    You rock. It works great.

    Plugin Author sevenspark

    (@sevenspark)

    Great! Glad to hear it

    Great plugin..

    Is there a way to pass two variables to the contact page?

    I am already using..

    `<?php global $post;
    echo ‘<a href=”https://movies.docnzok.com/guestreview?context=&#8217;.urlencode(get_post_meta($post->ID, ‘IMDB’, true)) . ‘”>Create a GUEST REVIEW for ‘ . urlencode(get_the_title($post->ID)) . ‘</a>’;?></div>`

    Is there a way to send
    blah/guestreview?context=SOMETHING&title=SOMETHINGELSE

    and have dynamic pick up both variables

    Thanks for the plugin, I like it….

    Plugin Author sevenspark

    (@sevenspark)

    Glad you like the plugin.

    You can send as many variables as you want. You just set up two inputs to retrieve the GET variables. So your link would look like this:

    echo '<a href="https://movies.docnzok.com/guestreview?context='
       .urlencode(get_post_meta($post->ID, 'IMDB', true))
       .'&var2='.urlencode($mySecondVariable)
       .'">Create a GUEST REVIEW for ' . get_the_title($post->ID)
       .'</a>';

    (note you don’t need to call urlencode() in the link name, only in the URL)

    Then you have two inputs in the contact form. The CF7 tags would look something like this:

    [dynamictext context "CF7_GET key='context'"]
    [dynamictext secondvar "CF7_GET key='var2'"]

    Those two inputs would then get filled by the two GET variables. If you want both parameters in one input in the contact form, just concatenate the two strings and set them in one GET variable in your link.

    Hope that helps!

    I appreciate your fast response.

    I was able to do exactly what you said and it worked flawlessly. Now I can collect data from the post, go to a new contact page, pull in data from the GET and after the user fills out the rest of the form, input that data into the database for further uses and queries.

    Excellent.

    Happy Holidays.

    Plugin Author sevenspark

    (@sevenspark)

    Great! Glad to hear it worked for you.

    Happy holidays to you as well!

    Hello everyone. There’s still a function I can’t get to work about this plug-in extension.
    I have a drop-down field call University with a large number of options. The last option is “Other”, and I want a text field to appear/unblock when this option is selected.
    Can anyone help me with that? Thank you very much!!

    Plugin Author sevenspark

    (@sevenspark)

    @kechi, this doesn’t really have anything to do with CF7 DTX, but I just wrote a jQuery script that’ll take care of this for you.

    https://jsfiddle.net/sevenspark/bBUGc/8/

    Enjoy ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Contact Form 7 Dynamic Text Extension] page shortcodes?’ is closed to new replies.