Plugin Directory

Test out the new Plugin Directory and let us know what you think.

A Forms

Create easy contact forms.

A wordpress plugin that allows you to add a form on your website. It's quite easy to configure, some what like C Forms II, but you have the ability to get regular updates and its available on the WordPress Plugin site.

Since version 2.0.2, you can now create advanced validation rules. There are unlimited amount of validation rules that you could have in a form which makes it difficult to manage using a UI. In A Forms you can now create a Global variable called $GLOBALS["aforms_additional_validations_for_4"] (where 4 is the id of the form) in your themes function file and set a validation array to it.

For example lets say you have an email field, a contact field and a preferred method of contact field. The preferred method of contact field is a checkbox field with the values Email and Phone. You want to make sure your visitor fills in Phone if Phone is selected by the preferred method of contact. All you need to do is assign an array like $GLOBALS["aforms_additional_validations_for_4"]["a_form_contact_us_phone"] = "required" to $GLOBALS["aforms_additional_validations_for_4"] (remember to replace the 4 with your forms id) if the phone field is empty while the preferred method of contact is Phone.

Here is some sample code:

add_action( 'init', 'register_a_forms_additional_validations' ); function register_a_forms_additional_validations() { $GLOBALS["aforms_additional_validations_for_4"] = array(); if (isset($_POST["a_form_contact_us_preferred_method_of_contact_1"]) && isset($_POST["a_form_contact_us_phone"]) && $_POST["a_form_contact_us_preferred_method_of_contact_1"] == "Phone" && $_POST["a_form_contact_us_phone"] == "") { $GLOBALS["aforms_additional_validations_for_4"]["a_form_contact_us_phone"] = "required"; } if (isset($_POST["a_form_contact_us_preferred_method_of_contact_0"]) && isset($_POST["a_form_contact_us_email"]) && $_POST["a_form_contact_us_preferred_method_of_contact_0"] == "EMail" && $_POST["a_form_contact_us_email"] == "") { $GLOBALS["aforms_additional_validations_for_4"]["a_form_contact_us_email"] = "required"; } }

Tags: , ,

Requires: 3.3 or higher
Compatible up to: 4.4.6
Last Updated: 1 year ago
Active Installs: 10+


4 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.