[ class tree: plugins ] [ index: plugins ] [ all elements ]

Procedural File: contact_form.php

Source Location: /zp-extensions/contact_form.php

Page Details

Prints an e-mail contact form that uses Zenphoto's internal validation functions for e-mail and URL.

Name, e-mail address, subject and message are required fields by default. You need to enter a custom mail address that should be used for the messages.

Supports Zenphoto's CAPTCHA and confirmation before the message is sent. No other spam filter support, since mail providers have this anyway.

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

Author:  Malte Müller (acrylian), Stephen Billard (sbillard)
Classes
Class Description
contactformOptions Plugin option handling class
Functions
checkRequiredField  [line 372]

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

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

Parameters:
string   $option:  the option value


string checkRequiredField( string $option  )

[ Top ]
getField  [line 147]

Retrieves the post field if it exists

Parameters:
string   $field: 
int   $level: 


string getField( string $field, [int $level = 3]  )

[ Top ]
printContactForm  [line 160]

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.

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:
string   $subject_override:  set to override the subject.


void printContactForm( [string $subject_override = '']  )

[ Top ]
showOrNotShowField  [line 357]

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

Only for the fields set by radioboxes.

Parameters:
string   $option:  The option value


bool showOrNotShowField( string $option  )

[ Top ]


Documentation generated on Tue, 20 Dec 2011 16:07:07 +0100 by phpDocumentor 1.4.3