PHP Mailer not printing Value

5 replies · opened Jun 8, 2019

PpankicidJun 8, 2019

Hi, I have a contact form like on the screenshot_1.
This is my HTML Code:


								

								
									Name *
									
								

								
									Email *
									
								

								
									Telefon
									
								

								

								
									1. Um welche Projektart handelt es sich?
									
										-- Auswählen --
										Private Website
										Firmenwebsite
										Webshop
										Weiß nicht
									
								

								

								
									2. Was soll gemacht werden?
									
										-- Auswählen --
										Website Erstellen
										Website Aktualisieren
										Weiß nicht
									
								

								

								
									3. Gibt es bereits einen Server für die Seite?
									
										-- Auswählen --
										Ja
										Nein
										Weiß nicht
									
								

								

								
									4. Wer soll die Inhalte der Website pflegen?
									
										-- Auswählen --
										Agentur
										Eigenständig
										Weiß nicht
									
								

								

								
									5. Besteht bereits ein Corporate Design?
									
										-- Auswählen --
										Ja
										Nein
										Weiß nicht
									
								

								

								
									6. Ist ein Domain- und Hosting-Paket vorhanden?
									
										-- Auswählen --
										Ja
										Nein
										Weiß nicht
									
								

								

								
									7. Welche Aussage trifft am ehesten auf Ihr Unternehmen zu?
									
										-- Auswählen --
										Geplante Gründung in unbestimmter Zukunft
										Unternehmen ist jünger als 6 Monate
										Unternehmen ist älter als 6 Monate
										Sonstiges
									
								

								

								
									8. Wann sollen die Maßnahmen abgeschlossen sein?
									
										-- Auswählen --
										So schnell wie möglich
										In 1 bis 3 Monaten
										In mehr als 3 Monaten
										Weiß nicht
									
								

							
								

								
									Nachricht *
									
								

								
									
								

								
									Los Geht's
								

							

I have also change the sendmail-autoresponder.php file like this:

if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
	if( $_POST['template-contactform-email'] != '' ) {

		$name = isset( $_POST['template-contactform-name'] ) ? $_POST['template-contactform-name'] : '';
		$email = isset( $_POST['template-contactform-email'] ) ? $_POST['template-contactform-email'] : '';
		$phone = isset( $_POST['template-contactform-phone'] ) ? $_POST['template-contactform-phone'] : '';
		$service = isset( $_POST['template-contactform-service'] ) ? $_POST['template-contactform-service'] : '';
		$service1 = isset( $_POST['template-contactform-service1'] ) ? $_POST['template-contactform-service1'] : '';
		$service2 = isset( $_POST['template-contactform-service2'] ) ? $_POST['template-contactform-service2'] : '';
		$service3 = isset( $_POST['template-contactform-service3'] ) ? $_POST['template-contactform-service3'] : '';
		$service4 = isset( $_POST['template-contactform-service4'] ) ? $_POST['template-contactform-service4'] : '';
		$service5 = isset( $_POST['template-contactform-service5'] ) ? $_POST['template-contactform-service5'] : '';
		$service6 = isset( $_POST['template-contactform-service6'] ) ? $_POST['template-contactform-service6'] : '';
		$service7 = isset( $_POST['template-contactform-service7'] ) ? $_POST['template-contactform-service7'] : '';
		$service8 = isset( $_POST['template-contactform-service8'] ) ? $_POST['template-contactform-service8'] : '';
		$subject = isset( $_POST['template-contactform-subject'] ) ? $_POST['template-contactform-subject'] : '';
		$message = isset( $_POST['template-contactform-message'] ) ? $_POST['template-contactform-message'] : '';

		$subject = isset($subject) ? $subject : 'New Message From Contact Form';

I have also change the sendmail-subscribe.php file like this:

if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
	if( $_POST['template-contactform-email'] != '' ) {

		$name = $_POST['template-contactform-name'];
		$email = $_POST['template-contactform-email'];
		$subscribe_email = $email;
		$phone = $_POST['template-contactform-phone'];
		$service = $_POST['template-contactform-service'];
		$service1 = $_POST['template-contactform-service1'];
		$service2 = $_POST['template-contactform-service2'];
		$service3 = $_POST['template-contactform-service3'];
		$service4 = $_POST['template-contactform-service4'];
		$service5 = $_POST['template-contactform-service5'];
		$service6 = $_POST['template-contactform-service6'];
		$service7 = $_POST['template-contactform-service7'];
		$service8 = $_POST['template-contactform-service8'];
		$subject = $_POST['template-contactform-subject'];
		$message = $_POST['template-contactform-message'];

		$subject = isset($subject) ? $subject : 'New Message From Contact Form';

I have also change the sendmail.php file like this:

if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
	if( $_POST['template-contactform-email'] != '' ) {

		$name = isset( $_POST['template-contactform-name'] ) ? $_POST['template-contactform-name'] : '';
		$email = isset( $_POST['template-contactform-email'] ) ? $_POST['template-contactform-email'] : '';
		$phone = isset( $_POST['template-contactform-phone'] ) ? $_POST['template-contactform-phone'] : '';
		$service = isset( $_POST['template-contactform-service'] ) ? $_POST['template-contactform-service'] : '';
		$service1 = isset( $_POST['template-contactform-service1'] ) ? $_POST['template-contactform-service1'] : '';
		$service2 = isset( $_POST['template-contactform-service2'] ) ? $_POST['template-contactform-service2'] : '';
		$service3 = isset( $_POST['template-contactform-service3'] ) ? $_POST['template-contactform-service3'] : '';
		$service4 = isset( $_POST['template-contactform-service4'] ) ? $_POST['template-contactform-service4'] : '';
		$service5 = isset( $_POST['template-contactform-service5'] ) ? $_POST['template-contactform-service5'] : '';
		$service6 = isset( $_POST['template-contactform-service6'] ) ? $_POST['template-contactform-service6'] : '';
		$service7 = isset( $_POST['template-contactform-service7'] ) ? $_POST['template-contactform-service7'] : '';
		$service8 = isset( $_POST['template-contactform-service8'] ) ? $_POST['template-contactform-service8'] : '';
		$subject = isset( $_POST['template-contactform-subject'] ) ? $_POST['template-contactform-subject'] : '';
		$message = isset( $_POST['template-contactform-message'] ) ? $_POST['template-contactform-message'] : '';

		$subject = $subject ? $subject : 'New Message From Contact Form';

**Тhe emails I get have only one field value (see Screenshot_2) **
Please help me to solve this issue

SSemicolon WebSTAFFJun 10, 2019

Hello,

You appear to be using the Older Version of the Files. The Latest Version of Canvas uses include/form.php File which is more advanced and more flexible, as it does not require you to Edit the PHP File to add extra fields to your Forms. Please update to the Latest Version of the Files as this should fix your issues.

Hope this Helps!

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

PpankicidJun 15, 2019

Hi please ignore my last message, I have figured out, but now I have another problem, all my forms (3 of them) working super but on index.html page when I submit the contact form I receive e-mail but my page crush.(blank page with my "alert": "success", "message" on it ) See the attached image.

PpankicidJun 15, 2019

Please ignore all my messages I have figured out.
Sorry...

SSemicolon WebSTAFFJun 15, 2019

Hello,

Really Glad that your issues were resolved. Thanks for your Patience.

Hope you will like the New Forms Processor and all its Customization Capabilities.

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

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