Home › Forums › Quform WordPress › after submit redirect passing url-variable
- This topic has 10 replies, 2 voices, and was last updated 11 years, 3 months ago by squareweb.
- AuthorPosts
- July 27, 2013 at 3:38 pm #5489squarewebParticipant
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
July 28, 2013 at 11:47 am #5501AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 6, 2013 at 8:21 am #5653squarewebParticipantHi 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
August 6, 2013 at 10:49 am #5657AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 6, 2013 at 11:00 am #5660squarewebParticipantThanks Ally for quick response.
I’ll fix this right away.
Mark
August 6, 2013 at 11:05 am #5662squarewebParticipantSorry 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
August 6, 2013 at 11:07 am #5663AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 6, 2013 at 11:22 am #5666squarewebParticipantSuper Ally,
Thanks again.
Mark
August 18, 2013 at 7:28 pm #5847squarewebParticipantHi 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;
}August 18, 2013 at 8:45 pm #5848squarewebParticipantAlly,
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
August 19, 2013 at 1:12 pm #5855squarewebParticipantManged to fix this myself.
Sorry for bothering.mark
- AuthorPosts
- You must be logged in to reply to this topic.