WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Dynamic Text Extension
[resolved] Get the value of a field on a 1st page into the field of a 2nd page (7 posts)

  1. digibuze
    Member
    Posted 3 months ago #

    Hi,

    how can I get into a field of my form as a default value (like a placeholder), the value of a field that was filled out in a previous page.

    e.g: A CF7 field asks me to enter my email address to subscribe a newsletter. Once I submit it, I land on another page with a more precise CF7 form, where the email address field contains already the address I previously entered.

    Thank you for your help

    https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/

  2. digibuze
    Member
    Posted 3 months ago #

    So, I found out how to get the value from my into my dynamic field. Now my last concern is about the url itself. I don't know how to redirect the first form to a page with a dynamic url like "http://www.my-site.com/email=email_entered" ?

    Thank you

  3. pobrecht
    Member
    Posted 3 months ago #

    So how did you get the value of one field into the field on the next page (see my post just before yours)?

  4. digibuze
    Member
    Posted 3 months ago #

    Hi Pobrecht,

    very easily. I just used a dynamic text field on the second form looking like this: [dynamictext* your-email id:your-email "CF7_GET key='your-email'"] just as it was explained in the plugin guide: http://wordpress.org/plugins/contact-form-7-dynamic-text-extension/
    The field is filled out with the xxx value in: "http://www.my-site.com/?your-email=xxx

    My main problem still remains however, because there's nothing mentioned about passing the value of a field in form 1 to the url of the landing page...

    Thanks for the savior who will have the answer :)

  5. sevenspark
    Member
    Plugin Author

    Posted 3 months ago #

    Hi digibuze,

    Glad to hear you got the first part sorted :)

    I'm not sure I exactly understand your second question.

    With HTML forms, the page that is redirected to dictated by the action attribute on the form element. If the method is "GET", the values in that form will be submitted as part of that URL. For example, if the action="http://mysite.com/contact" and there is an input with the name email and value me@gmail.com, the form would submit to the URL:

    http://mysite.com/contact?email=me@gmail.com

    With CF7, since it's an AJAX form, the page does not redirect by default, however. Though you can force it to redirect as shown here: http://contactform7.com/redirecting-to-another-url-after-submissions/

    That being said, I'm not sure if the submitted params will be intact (probably not) - so it might be better to submit from a normal (non-CF7) form to the page with the CF7 form instead.

    Hope that makes sense! :)

    Chris

  6. digibuze
    Member
    Posted 3 months ago #

    Hey Chris,

    thanks a lot for your help.
    Yes, it totally makes sens, but I finally found out another solution which did not consist of using a CF7 form form my first step field. I did it using a form action with the get method. The render is of course exactly the same and it was much easier to handle ;)

    Thanks again anyway

  7. sevenspark
    Member
    Plugin Author

    Posted 3 months ago #

    You're welcome

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.