Redirect to a thank you page not working

2 replies·opened Jan 8, 2022
P
publicsarJan 8, 2022

I am using a modal and after successfully processing the form with form.php, I can't get it to redirect to a thank you page. Have I place the redirect code in the wrong place? The code is below.

<!-- Modal -->
<div class="modal1 mfp-hide" id="myModal1" data-redirect=".../thank-you.html">

					&lt;div class="block mx-auto" style="background-color: #FFF; max-width: 700px;"&gt;
						&lt;div class="row m-0"&gt;
							&lt;div class="col-md-6" data-height-xl="456" data-height-lg="456" data-height-md="456" data-height-sm="0" data-height-xs="0" style="background-image: url(one-page/images/page/4.jpg); background-size: cover;"&gt;&lt;/div&gt;
							&lt;div class="col-md-6 col-padding" data-height-xl="456" data-height-lg="456" data-height-md="456" data-height-sm="456" data-height-xs="456"&gt;
								&lt;div&gt;
								&lt;h4 class="text-uppercase ls1"&gt;Sign Up for Offers&lt;/h4&gt;
								&lt;form action="include/form.php" class="row mb-0" style="max-width: 300px;"&gt;
									&lt;div class="col-12 form-group"&gt;
										&lt;label for="" class="text-capitalize font-weight-semibold"&gt;Username or Email:&lt;/label&gt;
										&lt;input type="email" id="template-op-form-email" name="template-op-form-email" value="" class="sm-form-control" /&gt;
									&lt;/div&gt;
									&lt;div class="col-12 form-group"&gt;
										&lt;label for="" class="text-capitalize font-weight-semibold"&gt;Choose Password:&lt;/label&gt;
										&lt;input type="password" id="template-op-form-password" name="template-op-form-password" value="" class="sm-form-control" /&gt;
									&lt;/div&gt;
									&lt;div class="col-12 form-group"&gt;
										&lt;button type="submit" class="button button-rounded button-small button-dark m-0" value="submit"&gt;Register Now&lt;/button&gt;
									&lt;/div&gt;
								&lt;/form&gt;
								&lt;p class="mb-0"&gt;&lt;small class="font-weight-light"&gt;_* No Credit Card Required_&lt;/small&gt;&lt;/p&gt;
								&lt;/div&gt;
							&lt;/div&gt;
						&lt;/div&gt;
					&lt;/div&gt;
				&lt;/div&gt;
                &lt;!-- End Modal--&gt;
S
SemiColonWebSTAFFJan 8, 2022

Hello,

Please make sure that you are using the Proper Code Markup for the Forms as mentioned in the Documentation: https://docs.semicolonweb.com/docs/forms/form-setup/#docs-snippet-html . Try using this code:

<!– Modal –>
<div class="modal1 mfp-hide" id="myModal1">

<div class="block mx-auto" style="background-color: #FFF; max-width: 700px;">
<div class="row m-0">
<div class="col-md-6" data-height-xl="456" data-height-lg="456" data-height-md="456" data-height-sm="0" data-height-xs="0" style="background-image: url(one-page/images/page/4.jpg); background-size: cover;"></div>
<div class="col-md-6 col-padding" data-height-xl="456" data-height-lg="456" data-height-md="456" data-height-sm="456" data-height-xs="456">
<div>
<h4 class="text-uppercase ls1">Sign Up for Offers</h4>

<div class="form-widget" data-redirect="…/thank-you.html">
	<div class="form-result"></div>
	<form id="template-op-form" action="include/form.php" class="row mb-0" style="max-width: 300px;">
	<div class="form-process"></div>
	<div class="col-12 form-group">
	<label for=" class="text-capitalize font-weight-semibold">Username or Email:</label>
	<input type="email" id="template-op-form-email" name="template-op-form-email" value=" class="sm-form-control" />
	</div>
	<div class="col-12 form-group">
	<label for=" class="text-capitalize font-weight-semibold">Choose Password:</label>
	<input type="password" id="template-op-form-password" name="template-op-form-password" value=" class="sm-form-control" />
	</div>
	<div class="col-12 form-group">
	<button type="submit" class="button button-rounded button-small button-dark m-0" value="submit">Register Now</button>
	</div>
	<input type="hidden" name="prefix" value="template-op-form-">
	<input type="hidden" name="subject" value="Message from OnePage Form">
	</form>
</div>

<p class="mb-0"><small class="font-weight-light">* No Credit Card Required</small></p>
</div>
</div>
</div>
</div>
</div>
<!– End Modal–>

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

P
publicsarJan 11, 2022

Thank you. That worked.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard