• Resolved youfollow

    (@youfollow)


    I’ve been using contact form 7 for 2 years now. I love how it handles the creation of forms. I now wish to go a step further and that is to create a dynamic src link based on the input submitted in the first form. Hopefully, an example might illustrate what I wish to achieve.

    To start with I’ve installed contact form 7 together with the plugin “Send pdf with CF7” to submit the content in a PDF file. In the form, I’ve created a hidden field tag “[hidden myname default:get]” which is being parsed to the pdf content. Parsing the value of “myname” works fine. So that’s not the issue.

    What I’d like to achieve is to have the value of [myname] to be parsed as part of a src link. E.g. I actually would like to create the img src link by replacing [myname] with the actual value of the variable. I tried , as well as a few other tryouts but they, didn’t help. Do hope you get my point.

    Is there a way to create the link dynamically based on the value that is submitted in the contact form and transferred to the form in “Send PDF for Contact Form 7”. The src link in “” I wish to create is located in the form in the PDF contact form plugin.

    Hopefully you can help me out.
    Thanks in advance,
    Shirley

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter youfollow

    (@youfollow)

    As the Img links disappeared I resubmitted my topic. These are essential to figure out what i wish to create.
    I’ve been using contact form 7 for 2 years now. I love how it handles the creation of forms. I now wish to go a step further and that is to create a dynamic src link based on the input submitted in the first form. Hopefully, an example might illustrate what I wish to achieve.

    To start with I’ve installed contact form 7 together with the plugin “Send pdf with CF7” to submit the content in a PDF file. In the form, I’ve created a hidden field tag “[hidden myname default:get]” which is being parsed to the pdf content. Parsing the value of “myname” works fine. So that’s not the issue.

    What I’d like to achieve is to have the value of [myname] to be parsed as part of a src link. E.g. img src=”mydomain.com/path/[myname].jpg” I actually would like to create the img src link by replacing [myname] with the actual value of the variable. I tried img src=”mydomain.com/path/”.[myname].”.jpg”, as well as a few other tryouts but they, didn’t help. Do hope you get my point.

    Is there a way to create the link dynamically based on the value that is submitted in the contact form and transferred to the form in “Send PDF for Contact Form 7″. The src link in img src=”mydomain.com/path/[myname].jpg” I wish to create is located in the form in the PDF contact form plugin.

    Hopefully you can help me out.
    Thanks in advance,
    Shirley

    Thread Starter youfollow

    (@youfollow)

    I managed to solve it on my own. For those interested this is the solution after having installed the plugin at: https://nl.www.ads-software.com/plugins/contact-form-7-dynamic-mail-to/

    function wpcf7_dynamic_to_filter_example($recipient, $args=array()) {
    if (isset($args[‘sphouder’])) { //this identifier is send as a paramater in the url
    if ($args[‘sphouder’] == ‘Full Name’) {
    $recipient = ’[email protected], <[your-email]>’; }
    elseif ($args[‘sphouder’] == ‘Full Name 2′) {
    $recipient = ’[email protected], <[your-email]>’;}
    elseif ($args[‘sphouder’] == ‘Full Name 3′) {
    $recipient = ’[email protected], <[your-email]>’;}
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create a dynamic URL using contact form 7’ is closed to new replies.