after submit redirect passing url-variable

Home Forums Quform WordPress after submit redirect passing url-variable

This topic is: resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5489
    squareweb
    Participant

    Hi,
    Just bought your wp-formplugin, can’t find information if following is possible:

    After submit (and storage of formdata in DB) I’d like to redirect to wordpress-page and add the (already) submitted formID tot the URL-string. In this way I can pick them up and youse them in the next (redirect)page (plugin).

    Is this possible?

    Thanks in advance

    Mark

    #5501
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #5653
    squareweb
    Participant

    Hi Ally,

    This is really great thanks for that. One question: Is it possible to also send the formID of the saved form with it. In this way I can configuer my join-query with other table much easyer….

    Thanks in advance

    Mark

    #5657
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #5660
    squareweb
    Participant

    Thanks Ally for quick response.

    I’ll fix this right away.

    Mark

    #5662
    squareweb
    Participant

    Sorry Ally I was not clear enough….

    I ment the ID of the generated (sent) form (entry) after the user has filled in the form and its stored in the DB……

    Excuses.

    Mark

    #5663
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #5666
    squareweb
    Participant

    Super Ally,

    Thanks again.

    Mark

    #5847
    squareweb
    Participant

    Hi Ally,
    I’ve implemented your solution. But in one way or another the query-variables are not added to the WP global query variables. The redirect-URL is looking good though (with desired parameter included) but I can not fetch the URL-variable on the target-page.

    I tested it by echoing the added URL-variable just after adding it with add_query_arg() but it is even on this location in code not showing up?

    Hope you can help me out here?

    Thanks in advance

    PS below is my function.php code

    mark

    add_action(‘iphorm_success_redirect_url_1’, ‘sqw_modify_form_redirect’, 10, 2);

    function sqw_modify_form_redirect($url, $form)
    {
    global $wp_query;
    $url = add_query_arg(‘sqw_qid’, $form->getEntryId(), get_permalink(316));
    // testing added url-parm
    $sqw_entry_id = get_query_var(‘sqw_qid’);
    error_log(‘NU : ‘. $sqw_entry_id , 1, ‘info@xyz.nl’);
    return $url;
    }

    add_filter(‘query_vars’, ‘sqw_query’);

    function sqw_query($qvars) {
    $qvars[] = ‘sqw_qid’;
    return $qvars;
    }

    #5848
    squareweb
    Participant

    Ally,

    I’ve added some PHP by including a widget in the footer and printing by:

    echo “variable: ” . get_query_var(‘sqw_qid’);

    Its shows that the url-variable does indeed exists meaning the above code works.

    So my problem is solved, i.e. I have to find out why the variable cannot be “seen” within one of my functions in the class I’m using?

    Any advice?

    Mark

    #5855
    squareweb
    Participant

    Manged to fix this myself.
    Sorry for bothering.

    mark

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy