Issue with contacform

5 replies·opened Sep 25, 2023
D
DavegdrSep 25, 2023

Hello Semicolon

I seem to be having - unexplainable - issues with the contact form (it's doing basically nothing).

Code used below. I also added a live URL.

						<div class="form-widget">

							<div class="form-result"></div>

							<!-- Contact Form
							============================================= -->
							<form class="row mb-0" id="template-contactform" name="template-contactform" method="post" action="include/form.php">

								<div class="col-12 form-group">
									<label for="template-contactform-name">Naam <small>*</small></label>
									<input type="text" id="template-contactform-name" name="template-contactform-name" value="" class="form-control required">
								</div>

								<div class="col-12 form-group">
									<label for="template-contactform-email">Email <small>*</small></label>
									<input type="email" id="template-contactform-email" name="template-contactform-email" value="" class="required email form-control">
								</div>

								<div class="col-12 form-group">
									<label for="template-contactform-phone">Tel</label>
									<input type="text" id="template-contactform-phone" name="template-contactform-phone" value="" class="form-control">
								</div>

								<div class="col-12 form-group">
									<label for="template-contactform-message">Bericht <small>*</small></label>
									<textarea class="required form-control" id="template-contactform-message" name="template-contactform-message" rows="6" cols="30"></textarea>
								</div>

								<div class="col-12 form-group d-none">
									<input type="text" id="template-contactform-botcheck" name="template-contactform-botcheck" value="" class="form-control">
								</div>

								<div class="col-12 form-group">
									<button class="button button-white text-dark text-ts h-text-color m-0" type="submit" id="template-contactform-submit" name="template-contactform-submit" value="submit">Verzenden</button>
								</div>

								<input type="hidden" name="prefix" value="template-contactform-">
								<input type="hidden" name="subject" value="Bericht RT Training and Coaching">
								<input type="hidden" name="template" value="text">
								<input type="hidden" name="replyto" value="template-contactform-email">
								<input type="hidden" name="message[success]" value="Wij hebben je email goed ontvangen en proberen je spoedig antwoord te geven. Indien je geen antwoord krijgt, gelieve ook in je spam-folder te kijken.">

							</form>

						</div>

Happy to hear your feedback because I have absolutely no idea where to look .... The codes have been taken straight from the model codes ..

S
SemiColonWebSTAFFSep 26, 2023

Hello,

Since your Form File: include/form.php (https://www.rt-training.be/include/form.php) is returning a 500 Internal Server Error, it is an indication that this is a Server Configuration issue.

Please consider adding the .customjs Class to the .form-widget DIV and then the following code at the very top of your include/form.php File just after the opening php tags:

error_reporting(E_ALL);

which should display all the possible errors. Please notify us about the Error Message you see, after going through the process above, so that we can provide you with further assistance on this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

D
DavegdrSep 26, 2023

Hello Semicolon

I did what you asked but no error messages pop-up.

I've also made https://www.rt-training.be/testmail.html with the Canvas 7 contac page and only added the customjs -> it also shows no errors (blank screen)

Just to be sure, this is now the PHP file:

<?php

/*-------------------------------------------------

	Form Processor Plugin
	by SemiColonWeb

---------------------------------------------------*/

/*-------------------------------------------------
	PHPMailer Initialization
---------------------------------------------------*/

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
error_reporting(E_ALL);

/*-------------------------------------------------
	Receiver's Email
---------------------------------------------------*/

$toemails = array();

$toemails[] = array(
	'email' => 'redert@rt-training.be', // Your Email Address
	'name' => 'Redert (RT Training)' // Your Name
);

/*-------------------------------------------------
	Sender's Email
---------------------------------------------------*/

$fromemail = array(
	'email' => 'redert@rt-training.be', // Company's Email Address (preferably currently used Domain Name)
	'name' => 'RT Training and Coaching' // Company Name
);
S
SemiColonWebSTAFFSep 26, 2023

Hello,

Would it be possible for you to provide us with FTP Access, so that we can check this for you and fix it? Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

D
DavegdrSep 26, 2023

<Host> ftp.rt-training.be
<User> rt-trainingbe@rt-trainingbe
<pass> MS3hUU4m

S
SemiColonWebSTAFFSep 27, 2023

Hello,

Thanks for your Patience and FTP Details. Based on the Error Message, it appears that your Hosting Provider has blocked the PHP mail() function, or it is unavailable, which is why your Forms are not functional. You will need to SMTP: https://docs.semicolonweb.com/docs/forms/form-setup/#docs-section-php in order to send Emails.

Hope this Helps!

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

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