A Forms Wordpress Plugin - Rating, Reviews, Demo & Download

A Forms Wordpress Plugin - Rating, Reviews, Demo & Download
4 Average out of 1 ratings
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

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”;
}
}

Screenshots

No screenshots provided


Reviews & Comments