AveForms is a WordPress plugin for creating and managing custom contact forms using shortcodes and a custom post type.
- Create forms using a custom post type (
Aveform) - Add forms to any page or post using shortcodes
- Supports text, email, textarea inputs, and submit buttons
- Built-in validation with custom error messages
- AJAX form submission
- Copy the
aveformsfolder to your WordPress site'swp-content/plugins/directory. - In your WordPress admin, go to Plugins and activate AveForms.
- In the WordPress admin, go to Aveforms in the sidebar.
- Click Add New Form.
- Use the editor to define your form using the
[aveform]shortcode and its child shortcodes.
[aveform form_id="theform"]
[aveform_input type="text" name="first_name" label="First Name" placeholder="First Name" rules="required{The field is required}|string{The value must be a string}|max:255{Maximum number of characters reached}|min:3{Minimum number of characters not met}"]
[aveform_input type="text" name="last_name" label="Last Name" placeholder="Last Name" rules="required|string|max:255|min:3"]
[aveform_input type="email" name="email" label="Email" placeholder="email@email.com" rules="required|email"]
[aveform_textarea name="message" cols="5" rows="10" label="Message" placeholder="Type your message here" rules="required|min:10|max:500"]
[aveform_submit text="Send" class="button button-primary"]
[/aveform]
After publishing your form, copy the shortcode from the Shortcode column in the Aveforms list (e.g., [aveformshow id="123"]).
Paste this shortcode into any page or post where you want the form to appear.
Wraps your form fields.
Attributes:
form_id(string): HTML ID for the form.form_class(string): CSS class for the form.title(string): Form title.description(string): Form description.
Adds a text/email input.
Attributes:
type(text|email|etc): Input type.name(string): Field name (required).label(string): Field label.placeholder(string): Placeholder text.rules(string): Validation rules (see below).
Adds a textarea input.
Attributes:
name(string): Field name (required).label(string): Field label.placeholder(string): Placeholder text.rows(int): Number of rows.cols(int): Number of columns.rules(string): Validation rules.
Adds a submit button.
Attributes:
text(string): Button text.class(string): CSS class.
- Separate rules with
| - Add custom error messages in
{}after each rule
Examples:
required{This field is required}string{Must be a string}max:255{Too long}min:3{Too short}
Forms are submitted via AJAX. Success and error messages are displayed below the form.
- CSS: Edit
assets/css/aveforms.css - JS: Edit
assets/js/aveforms.js
For issues or feature requests, please contact the plugin author.