Home › Forums › Other › Can someone recommend a customizable contact form, please? › Reply To: Can someone recommend a customizable contact form, please?
August 4, 2014 at 11:31 pm
#177658
__
Participant
Alright. One change: in the class definition, in the htmlMarkup_userNotice
method, change this line:
'<p class="cform notice">'.htmlspecialchars( $this->_notice ).'</p>':
to
'<div class="cform-notice">'.$this->_notice.'</div>':
Now, you can put HTML markup into the messages, and it will be printed as normal HTML, and not escaped as text. For example:
protected $_notice_failure = "Sorry; there was a problem. Please try again.";
can now be changed to include HTML, like
protected $_notice_failure = <<< HTML
<p class=fancy>
<strong>Sorry!</strong>
You've caught us on a bad day.
<code>The server <span style="color:red;">caught on fire!!!</span>
<em>Try again tomorrow, kthxbye</em></p>
HTML;
Make sure your HTML is correct, since this approach does not allow us to validate it before printing it to the webpage.