ZenphotoCMS 1.6.x

contactform

Interfaces, Classes, Traits and Enums

contactformOptions
Plugin option handling class

Table of Contents

getField()  : string
Retrieves the post field if it exists
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.
showOrNotShowField()  : bool
Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").
checkRequiredField()  : string
Helper function that checks if the field is a required one. If it returns '*" to be appended to the field name as an indicator.
printContactFormMacro()  : type
Buffers the contact form print out so it can be passed to its content macro
getContactFormMacros()  : array<string|int, mixed>
Registers the content macro(s)

Functions

getField()

Retrieves the post field if it exists

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

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.

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.

Return values
mixed

showOrNotShowField()

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

showOrNotShowField(string $option) : bool

Only for the fields set by radioboxes.

Parameters
$option : string

The option value

Return values
bool

checkRequiredField()

Helper function that checks if the field is a required one. If it returns '*" to be appended to the field name as an indicator.

checkRequiredField(string $option) : string

Not for the CAPTCHA field that is always required if shown...

Parameters
$option : string

the option value

Return values
string

printContactFormMacro()

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

printContactFormMacro([type $subject_override = '' ]) : type
Parameters
$subject_override : type = ''
Return values
type

getContactFormMacros()

Registers the content macro(s)

getContactFormMacros(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>

Search results