1 fredsy Feb 04, 2014 11:21
3 fredsy Feb 06, 2014 09:34
As I said, you can't just hide the subject field. If you hide it with css, it throws an error. If you comment out the field in _contact_msg.form.php, it throws an error. If you change the field from required=true to false, it throws an error. The only thing I found that works is hacking the htrsv/message_send.php and commenting out the error message itself:
// if( empty($subject) )
// {
// $Messages->add( T_('Please fill in the subject of your message.'), 'error' );
// }
and then in the same file changing the $subject to 'message from your website'.
{ // Send mail to registered user
$success_message = send_mail_to_User( $recipient_User->ID, 'Message from your website', 'contact_message_new', $email_template_params, false, array( 'Reply-To' => $sender_address ) );
Hello @fredsy,
Please read the comment I just leave you in your "honeypot" post (http://forums.b2evolution.net/adding-a-honeypot). Maybe it could be useful to let you know how to hide the subject field, and also how to add a new field to the form. I guess you could concatenate your new phone field with the
msg_text
field, in order to add it to the whole message and properly send it by email.Regards!