I went through several posts but I am not able to find an answer for what I’m trying to do. If I missed something pls point me to the post.
I have a form that appears in small box. What I want to happen is to instead of redirecting the visitor to a different page in order to see the ‘Thank you’ message to keep him to the same page and change the content of the div.
I have managed to go half way there (thanks to a post found here).
I am able to not redirect the visitor plus show him a ‘Thank You’ message, but I am not able to refresh the content. I still see the form.
I’m only familiar with html, css and a bit php so if there’s a solution that doesn’t include jquery, etc. would be great.
Here’s what I have so far:
HTML
<div id="mc_embed_signup">
<form action="" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" novalidate>
<div class="mc-field-group">
<input id="firstname3" type="text" value="" name="FNAME" placeholder="'Ονομα">
</div>
<div class="mc-field-group">
<input id="primaryemail3" type="email" value="" name="EMAIL" placeholder="Email">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
<div class="myResultDiv">
<input name="subscribe" class="button_link hover_fade large_button red button_widget" type="submit" value="ΣΤΕΙΛΤΕ ΤΟ ΔΩΡΟ ΜΟΥ!"></div>
</form>
<?php if (isset($_POST['subscribe'])) : ?>
<p>Thank you for subscribing!</p>
<?php endif; ?>
</div>
<div>
<p class="under_button2"></p>
<div class="af-clear">
</div>
</div>
</div>
<!--End mc_embed_signup-->
put your conditional logic outside the
divlike…This is under the assumption that you are looking for a server-side solution. i.e. you submit the form and rebuild the page.