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
– Use contactForm::getField() instead
getField(string $field[, int $level = 3 ]) : string
Parameters
- $field : string
- $level : int = 3
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.
– Use contactForm::printContactForm() instead
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.
showOrNotShowField()
Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").
– Use contactForm::isVisibleField() instead
showOrNotShowField(string $option) : bool
Only for the fields set by radioboxes.
Parameters
- $option : string
-
The option value
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.
– Use contactForm::getRequiredFieldMark() instead
checkRequiredField(string $option) : string
Not for the CAPTCHA field that is always required if shown...
Parameters
- $option : string
-
the option value
Return values
stringprintContactFormMacro()
Buffers the contact form print out so it can be passed to its content macro
– Use contactForm::printMacro() instead
printContactFormMacro([type $subject_override = '' ]) : type
Parameters
- $subject_override : type = ''
Return values
typegetContactFormMacros()
Registers the content macro(s)
– Use contactForm::getMacros() instead
getContactFormMacros(array<string|int, mixed> $macros) : array<string|int, mixed>
Parameters
- $macros : array<string|int, mixed>
-
Passes through the array of already registered