# contact-forms/trunk/PFBC/OptionElement.php

Contact Forms by Cimatti, version trunk. 31 lines.

- Page: https://pluginprobe.com/plugins/contact-forms/trunk/code/PFBC/OptionElement.php
- Raw: https://pluginprobe.com/plugins/contact-forms/trunk/raw/PFBC/OptionElement.php
- Modified: 2026-08-05T09:37:24+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/trunk/code/PFBC/OptionElement.php#L10-L20`.

```php
<?php
/**
 * PFBC (PHP Form Builder Class) - Third-party library
 * @package PFBC
 */

// phpcs:disable WordPress.Security.EscapeOutput, WordPress.NamingConventions.PrefixAllGlobals, PluginCheck.CodeAnalysis.Heredoc -- Third-party library

abstract class OptionElement extends Element {
	protected $options;

	public function __construct($label, $name, array $options, ?array $properties = null) {
		$this->options = $options;
		if(!empty($this->options) && array_values($this->options) === $this->options)
			$this->options = array_combine($this->options, $this->options);
		
		parent::__construct($label, $name, $properties);
	}

	protected function getOptionValue($value) {
        $position = strpos($value, ":pfbc");
        if($position !== false) {
            if($position == 0)
                $value = "";
            else
                $value = substr($value, 0, $position);
        }
        return $value;
    }
}

```
