• Yannik Meirowski

    (@yannikmeirowski)


    Hi there,

    we use Contact Form 7 to give our customers the chance to easily give us some more information. So we redirect them to a prefilled Contact Form, which states the information about them, we already have – so the customers just have to fill out the fields that are empty. We do this with URL Parameters. However, since the CF7 update 5.4, these URL Parameters don’t seem to work anymore. When I do a Version Rollback to 5.32, the form catches the parameters. We use the following script:

    <script text=”text/javascript”>

    var getUrlParameter = function getUrlParameter(sParam) {
    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
    sURLVariables = sPageURL.split(‘&’),
    sParameterName,
    i;
    for (i = 0; i < sURLVariables.length; i++) {
    sParameterName = sURLVariables[i].split(‘=’);
    if (sParameterName[0] === sParam) {
    return sParameterName[1] === undefined ? true : sParameterName[1];
    }
    }
    };

    var ip = getUrlParameter(‘ip’);
    document.getElementById(‘ip’).value = ip;`
    </script>`

    The script continues with a few more var items, but that’s it.

    Any way to fix this?

  • The topic ‘URL Parameters Issue with 5.4 Version’ is closed to new replies.