toemails

5 replies · opened Aug 1, 2020

LLuiz Augusto Correia de AraujoAug 1, 2020

Hi,

How to configure form.php to send emails to the ones we configure on a select combo fields like:


	-- Escolha um Setor--
	Sector A
	Sector B 
	Sector C 

Thank you!

SSemicolon WebSTAFFAug 1, 2020

Hello,

Find the following code in the include/form.php File:

$toemails[] = array(
				'email' => 'your-email@website.com', // Your Email Address
				'name' => 'Your Name' // Your Name
			);

and replace it with:

if( $_POST['template-contactform-service'] == 'service-1' ) {
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
} elseif( $_POST['template-contactform-service'] == 'service-2' ) {
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
} else {
	// Default Email
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
}

This should definitely work fine. Hope this Helps!

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

LLuiz Augusto Correia de AraujoAug 2, 2020

Hi!

Thank you so much! It works fine!

Please, let me ask the last question about email:

Where can I translate the html message (email) that are sent through the contact form?

I could change the variable $html_title by editing the line 177 on the include/form.php file, but I couldn't find where to edit the words: Name, Phone, Service, Message and Submit. I need to change this to Nome, Telefone, Setor, Mensagem and Enviado.

Regards,

Luiz

SSemicolon WebSTAFFAug 3, 2020

Hello,

Editing the include/form.php File is not required. Make sure that you completely check the Documentation on Forms Fields here: http://docs.semicolonweb.com/docs/forms/fields/ and Custom Settings here: http://docs.semicolonweb.com/docs/forms/settings/, as these are already mentioned here.

So, to set Custom Title, you will simply need to use the following HTML Code inside the Form:

For fields, if you want display Nome inside the Form Email, replace template-contactform-name in the HTML with template-contactform-nome.

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.

LLuiz Augusto Correia de AraujoAug 4, 2020

Thank you!

That works fine!

Thank you for your support so fast, kind and attentive.

Regards,

Luiz

SSemicolon WebSTAFFAug 4, 2020

Hello,

Very Happy to Help!

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