I converted the html site to WP recently on the contact page here xxxxx The problem is when the form is filled in and sent, the homepage appears and the thank you message appear on the home page [This thank you message is a part of small form on the homepage So should not be displayed as a thank you message of contact page] In fact a thank you message should appear in the same div same page [contact page] On a side note all the forms on the website are having the same issue [Thank you msg of all forms appear on homepage] but just to keep my question simple I have just mentioned contact page. Html version of same site works fine. xxxxx Have a look and submitting the form would give you a proper idea of what I am after I would highly appreciate if you helped me track down the issue and sort it.
You should set the form action to <?php the_permalink(); ?> to validate the data sent by the form on the same page. Therefore, you will need to copy the code from contact.php above the HTML form (in the same template file).
Hey thanks I just put form action to <?php the_permalink(); ?> and it worked! perfect your are a star!