wordpress: not able to pass form data from one page to other

I have two different forms on two pages. These two pages are using different page templates. I need to pass the form data from page1 to page2. I use below jQuery function.

if(form_validated) {
url = templateDir + "?page_id=1508"; //permalink of the submit page

        var form = '<form action="' + url + '" method="post">' +
            '<input type="hidden" name="pt-username" value="' + name + '"></input>' + 
            '<input type="hidden" name="pt-zipcode" value="' + zipcode + '"></input>' + 
            '<input type="hidden" name="pt-email" value="' + email + '"></input>' + '</form>';

        $('body').append(form);
        $(form).submit();
}

But on my page2 POST variables are blank. I am not able to get the form data on the page2.

Read More

Can anyone help me with this?

Related posts

Leave a Reply