Support » Plugin: Contact Form 7 - Dynamic Text Extension » Passing a dynamic variable into Contact Form 7 (on Click)

  • Resolved susiwalz


    Is it able to pass a WordPress custom field variable (group “Buchung”, values 781, 782 …, containing texts) into Contact Form 7 (using the function onclick=”splite_loader(781))?

    I would like to realize a clickable area (example on:, each area would pass on Click a different value to the contact form 7.

    This looks like that in contact form 7:
    [dynamictext reservation “CF7_get_post_var key=’Buchung'”].
    Right now, it only works with the static content [dynamictext reservation “CF7_get_post_var key=”781″].

    Thanks a lot in advance,
    Susanne Walz

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello susiwalz,

    I did that some days ago.

    The solution was this one:
    <p>Demande pour ce produit:<br/>
    [dynamictext contact-form-context id:contact-form-context uneditable « CF7_GET key=’product’ » ]

    <label> Votre nom (obligatoire)
    [text* your-name] </label>

    <label> Votre adresse de messagerie (obligatoire)
    [email* your-email] </label>

    <label> Objet
    [text your-subject] </label>

    <label> Votre message
    [textarea your-message] </label>

    [submit « Envoyer »]

    <hr />
    The link on the string you click on must be like this:

    As an example, if the string is 1203 then the link to the forms page would be

    Hope it helps you


    Thread Starter susiwalz


    Thanks, chti56,
    I think this is not working as I am using Contact Form 7 as a Popup (Slick Popup Lite).
    In Contact Form 7 I have a dynamic text like this:

    [dynamictext buchung “CF7_get_post_var key=’Buchung'”]

    In the HTML Element I use this:
    <div id=’contact-form-context’ class=”ton1″ title=’C für 1000 € Nr.781′ onclick=”splite_loader()”;>C</div>

    In a WordPress Custom Field I defined a Group “Buchung” with the entries 781 and 782…

    How did you link to the contact form? Did you enbed it in a singular page and then refer to this page?

    Thanks a lot,

    Hi Susi,
    I use Contact Form from a singular page

    I’ll have a look at Slick Popup Lite..

    Plugin Contributor sevenspark


    Hi Susi,

    Looking at your site, I’m pretty sure that your popup is loaded when your page loads – it’s just hidden.

    So clicking on your site isn’t going to have an impact on the data loaded, since the form has already been generated.

    The DTX won’t help you in this scenario. What you’ll want to do is just use javascript to change the value in your form on click.

    Hope that helps 🙂

    Hi there,
    bit of a novice at this but I’d like to pass through information from a link. So, say I have a pricing table and I click one of the product’s link. This then passes the product name to the CF7 form and upon submission emails this to the intended recipient.

    I guess then saving me building a form for every product…

    I can’t get my code to recognize the dynamic variables. It always shows them as characters.

    Like when I put this in my contact short code, it always just appears as html strings instead of forms or textboxes.

    <p>Demande pour ce produit:<br/>
    [dynamictext contact-form-context id:contact-form-context uneditable « CF7_GET key=’product’ » ]

    I’d assume that when I type “[dynamictext”, it would force the page to load with some kind of “dynamictext” functionality, but mine just assumes that it is just strings. Any idea on how I can get this working?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Passing a dynamic variable into Contact Form 7 (on Click)’ is closed to new replies.