Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Can someone recommend a customizable contact form, please? Reply To: Can someone recommend a customizable contact form, please?

#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.