# contact-forms/1.9.2/PFBC/PFBCError.php

Contact Forms by Cimatti, version 1.9.2. 31 lines.

- Page: https://pluginprobe.com/plugins/contact-forms/1.9.2/code/PFBC/PFBCError.php
- Raw: https://pluginprobe.com/plugins/contact-forms/1.9.2/raw/PFBC/PFBCError.php
- Modified: 2023-03-14T12:04:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/contact-forms/1.9.2/code/PFBC/PFBCError.php#L10-L20`.

```php
<?php
abstract class PFBCError extends Base {
	protected $form;

	public function __construct(array $properties = null) {
		$this->configure($properties);
	}

	public abstract function applyAjaxErrorResponse();

	public function clear() {
		echo 'jQuery("#', $this->form->getId(), ' .pfbc-error").remove();';
	}

	public abstract function render();
	public abstract function renderAjaxErrorResponse();

	public function renderCSS() {
		$id = $this->form->getId();
		echo <<<CSS
#$id .pfbc-error { padding: .5em; margin-bottom: 1em; }
#$id .pfbc-error ul { padding-left: 1.75em; margin: 0; margin-top: .25em; }
#$id .pfbc-error li { padding-top: .25em; }
CSS;
	}

	public function setForm(Form $form) {
		$this->form = $form;
	}
}

```
