Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wmbauer

    (@wmbauer)

    thank you for the information…as there was an answer but the problem could not be solved with that answer it does not really qualify for “bumping” as it deals only with posts that did not receive any answers at all. Therefore it would be helpful if people would only post real answers related to the topic.

    Actually I can’t believe that I am the only one who wants to read out parameters sent via GET with the URL and add it into hidden fields into a form. Of course I can use a plugin and manually add all keys but that is not a comfortable solution.

    <?php while (list ($key, $value) = each ($_REQUEST))
        {
            echo "<input type='hidden' name='".htmlspecialchars($key)."' value='".htmlspecialchars($value)."'>";
        }?>

    I just want these few lines of code in the form…is there anyone who has an idea how to get them inside a cf7-form?

    Thread Starter wmbauer

    (@wmbauer)

    push. anyone an idea?

    Thread Starter wmbauer

    (@wmbauer)

    Well, I can always use

    <script type="text/javascript">
    <!--
    var params = {};
    if (location.search) {
        var parts = location.search.substring(1).split('&');
    
        for (var i = 0; i < parts.length; i++) {
            var nv = parts[i].split('=');
            if (!nv[0]) continue;
            params[nv[0]] = nv[1] || true;
        }
    }
    var keyword = params.keyword;
    alert(keyword);
    //--></script>

    And then somehow try to get the values by id or whatever into the code…but that is not what I would like. Maybe someone else has an idea?

    Thread Starter wmbauer

    (@wmbauer)

    Thank you for your answer!

    How can I use a template file with cf7? I create a php file called list-param.php with my code and then?

    Or can I use JavaScript? I am just not sure if JavaScript can do the same as php can…and how the code would have to look like.

Viewing 4 replies - 1 through 4 (of 4 total)