ZenphotoCMS 1.6.3

contactForm

The plugin class

Tags
since
1.6.3

Procedural functions moved to class

Table of Contents

Properties

$processing_post  : mixed

Methods

getAutocompleteAttr()  : string
Gets the autocomplete attribute with the value passed if autocomplete is enabled Note that the value is not validated. See See e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete for valid values and tokens
getField()  : string
Retrieves the post field if it exists
getFieldVisiblilityOptionValue()  : string
Compatibility helper for parameters that formerly required the field visibility option values to be passed via e.g. getOption('contactform_title');
getFormAutocompleteAttr()  : string
Returns the autocomplete attribute for the form depending if autocomplete is enabled
getMacros()  : array<string|int, mixed>
Registers the content macro(s)
getProcessedFieldDisabledAttr()  : string
Returns the disabled attribute if the field is being processed
getRequiredAttr()  : string
Returns the required element attribute if the field is required
getRequiredFieldMark()  : string
Helper function that returns '*" to be appended to the field name as an indicator for required fields Not for the CAPTCHA field that is always required if shown.
isProcessingPost()  : bool
Returns true if the form is being processed.
isRequiredField()  : bool
Checks if a field is a required one
isVisibleField()  : bool
Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").
printAttributes()  : mixed
Wrapper for printing the disabled and required attributes as needed
printAutocompleteAttr()  : mixed
Prints the autocomplete attribute with the value passed if autocomplete is enabled Note that the value is not validated. See See e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete for valid values and tokens
printContactForm()  : mixed
Prints the mail contact form, handles checks and the mail sending. It uses Zenphoto's check for valid e-mail address and website URL and also supports CAPTCHA.
printMacro()  : type
Buffers the contact form print out so it can be passed to its content macro

Properties

$processing_post

private static mixed $processing_post = \false

Methods

getAutocompleteAttr()

Gets the autocomplete attribute with the value passed if autocomplete is enabled Note that the value is not validated. See See e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete for valid values and tokens

public static getAutocompleteAttr(string $value) : string
Parameters
$value : string
Tags
since
1.6.3
Return values
string

getField()

Retrieves the post field if it exists

public static getField(string $field[, int $level = 3 ]) : string
Parameters
$field : string
$level : int = 3
Return values
string

getFieldVisiblilityOptionValue()

Compatibility helper for parameters that formerly required the field visibility option values to be passed via e.g. getOption('contactform_title');

public static getFieldVisiblilityOptionValue(string $value) : string
Parameters
$value : string

The field option name or the field option value (legacy)

Tags
since
1.6.3
Return values
string

getFormAutocompleteAttr()

Returns the autocomplete attribute for the form depending if autocomplete is enabled

public static getFormAutocompleteAttr() : string
Tags
since
1.6.3
Return values
string

getMacros()

Registers the content macro(s)

public static getMacros(array<string|int, mixed> $macros) : array<string|int, mixed>
Parameters
$macros : array<string|int, mixed>

Passes through the array of already registered

Return values
array<string|int, mixed>

getProcessedFieldDisabledAttr()

Returns the disabled attribute if the field is being processed

public static getProcessedFieldDisabledAttr() : string
Tags
since
1.6.3
Return values
string

getRequiredAttr()

Returns the required element attribute if the field is required

public static getRequiredAttr(string $option) : string
Parameters
$option : string

The field option name or the field option value (legacy)

Tags
since
1.6.3
Return values
string

getRequiredFieldMark()

Helper function that returns '*" to be appended to the field name as an indicator for required fields Not for the CAPTCHA field that is always required if shown.

public static getRequiredFieldMark(string $option) : string

..

Parameters
$option : string

The field option name or the field option value (legacy)

Return values
string

isProcessingPost()

Returns true if the form is being processed.

public static isProcessingPost() : bool
Tags
since
1.6.3
Return values
bool

isRequiredField()

Checks if a field is a required one

public static isRequiredField(string $option) : bool
Parameters
$option : string

The field option name or the field option value (legacy)

Tags
since
1.6.3
global

bool $_processing_post

Return values
bool

isVisibleField()

Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").

public static isVisibleField(string $option) : bool

Only for the fields set by radioboxes.

Parameters
$option : string

The field option name or the field option value (legacy)

Return values
bool

printAttributes()

Wrapper for printing the disabled and required attributes as needed

public static printAttributes(string $option) : mixed
Parameters
$option : string

The field option name or the field option value (legacy)

printAutocompleteAttr()

Prints the autocomplete attribute with the value passed if autocomplete is enabled Note that the value is not validated. See See e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete for valid values and tokens

public static printAutocompleteAttr(string $value) : mixed
Parameters
$value : string
Tags
since
1.6.3

printContactForm()

Prints the mail contact form, handles checks and the mail sending. It uses Zenphoto's check for valid e-mail address and website URL and also supports CAPTCHA.

public static printContactForm([string $subject_override = '' ]) : mixed

The contact form itself is a separate file and is located within the /contact_form/form.php so that it can be style as needed.

Parameters
$subject_override : string = ''

set to override the subject.

printMacro()

Buffers the contact form print out so it can be passed to its content macro

public static printMacro([type $subject_override = '' ]) : type
Parameters
$subject_override : type = ''
Return values
type

        
On this page

Search results