Page 1 of 1

Name in contact form not required

Posted: Thu May 24, 2018 10:48 pm
by quitoxic
Hi There,
I need to remove the NAME field as required on the contact page (It should still be there but the form should send even if empty)
Could anyone guide me on this?

Thanks!

Re: Name in contact form not required

Posted: Thu May 24, 2018 11:06 pm
by yodapt
catalog/controller/information/contact.php

remove this

Code: Select all

if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 32)) {
	$this->error['name'] = $this->language->get('error_name');
}

Re: Name in contact form not required

Posted: Sun May 27, 2018 9:06 am
by Ol'Berst
Hello and thank you for the help.
Quitoxic wrote on my request.

I removed the suggested code, but unfortunately, this will result in the following error:

The message in the contact form won't get send and the User will be stuck in a blank page.

Any suggestions? THX

REGARDS Jesper

Re: Name in contact form not required

Posted: Tue May 29, 2018 12:33 pm
by quitoxic
As mentioned, once the code is removed I have a blank page after the submit button is clicked and the form does not send the email.
any ideas?