contactform
Table of Contents
Classes
- contactformOptions
- Plugin option handling class
- contactForm
- The plugin class
Functions
- 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
Tags
Return values
stringprintContactForm()
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.
Tags
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
Tags
Return values
boolcheckRequiredField()
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
Tags
Return values
stringprintContactFormMacro()
Buffers the contact form print out so it can be passed to its content macro
printContactFormMacro([type $subject_override = '' ]) : type
Parameters
- $subject_override : type = ''
Tags
Return values
typegetContactFormMacros()
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