HDForms | Contact Form Builder

Description

HDForms. The easiest way to create contact forms

HDForms was designed and built to be a super easy system to create contact forms of any size. The forms are automatically validated for user input, sanitized for security, and, of course, sent without fuss! HDForms comes with an easy to use contact form builder, and can be used for small contact forms, intake forms, request for quotes, or large applications.

With HDForms, you can even intelligently show or hide certain fields with ease – no coding required!

Video

A video is currently being made that will highlight just how easy HDForms is to use. Check back soon!

Features include 👍

  • Super easy to use (I really can’t express enough how easy HDForms is to use)
  • Will work with just about any well-coded theme right out of the box
  • Mobile-friendly (responsive design)
  • Form builder (drag and drop)
  • Column support
  • Custom toggles and triggers to show/hide elements
  • Emails are automatically built and validated
  • Automatic spam protection
  • Run your own function before and after form submit (for you devs out there!)
  • Pretty 🙂

Pretty much all of the standard features required for a form builder, with more options coming soon.

Upcoming Features ⏳

The following features are not yet included in HDForms, but are on the road map for future updates. Some of these features will be finalized in the next couple of weeks, others may be months down the line. This list is not in order of importance.

  • Phone number input element
  • File uploader element
  • Force semantic elements (global option)
  • Force HDForms style, inherit all styles from theme, or hybrid (only inherit inputs)
  • Ability to change the Replyto header
  • Translation ready. Sorry! English only for now 🇨🇦

❓ HOW TO USE | TUTORIAL ❓

Full tutorial and documentation is still being written. This section, along with a link to the full documentation will be updated ASAP.

First, create a new form. Select a listed element to open up the options for that element, and add it to the form. Add as many elements as needed, and reorder them with a drag-and-drop. You can also drag-and-drop elements into a column.

Once ready, save the form. The shortcode for the form can be found on the form edit page (content tab) or on the HDForms -> All Forms page. Just copy and paste the shortcode anywhere on the site to render the form. You can also use WordPress’s do_shortcode() function to render the form:

<?php echo do_shortcode("[hdf form = "formId"]"); ?>

Triggers

You can view the HDForms About / Options page to see an example of how triggers and toggles work.

Setting up triggers is by far the most complicated thing to do, but I hope that this quick tutorial will help.

You’ll need to know two things in order to create triggers. The trigger element, and the toggle element. The trigger element is the element that we check if its input has changed, and the toggle element is the element we either show or hide. In the above example, the trigger element is the checkboxes (specifically the one for “other”), and the toggle element is the text input.

In HDForms, each element you create gets a special and unique ID. You can find this ID by selecting the element to edit it. You’ll need to get the ID of the trigger element and paste it into the toggle element’s “Trigger Element” field. That’s it! By default, the toggle element will remain hidden unless the trigger element gets some data.

But what about, for example, like above, where I only want the toggle to happen if a certain checkbox is selected? In this case, we also want to pass along what “option” we want the trigger to work on (note: this is only for radio or checkboxes). This can be easily done by adding [x] to the end of the ID, where x is the number of the option. So in the above example, “other” is the fourth (4) listed option, so I would append [4] to the end of the ID. A full example trigger element id might look something like this hdf_3481_checkbox_oxpkhp[4]

Custom Form Submit Functions

HDForms can run a custom javascript or php function during the form submit process. With this, the sky is the limit!

When creating or editing a form, on the settings tab, place the name of your function in the Form Submit Action field. All function names must be prefixed with hdf_.

Here is an example of how to change the subject of the email, based on the input of one of our fields. In this example, the field hdf_3492_text_icmtp3 is a text input.

function hdf_custom_action(){
    global $hdf_form;
    global $hdf_subject;
    foreach($hdf_form as $v){
        if($v[2] === "hdf_3492_text_icmtp3"){
            if($v[3] === "test"){
                $hdf_subject = "My custom subject";
            }
        }
    }
}

The variable $hdf_form contains an array with all elements and includes element type, element name, element id, and element value. The above example loops through the array to find the element with the id hdf_3492_text_icmtp3. It then checks the value of the id. If the value equals “test”, then we update the subject of the sent email to “My custom subject”.

The global variables are

$hdf_form_id // contains the id of the form
$hdf_form // contains form data
$hdf_subject // email subject
$hdf_to // email send to

Using these custom functions, you can do things like update the subject, change who the form sends to, update any form values, or something completely different like saving the data to the database. The next version of HDForms will also allow you to override the success message as well.

Installation

The plugin can be installed like any other.

  1. Log into WordPress
  2. Select Plugins, then Add New
  3. Select Upload Plugin
  4. Choose the zip file, then Install and activate

Once installed, you will need to select HDForms from the left sidebar to create a new form. Once a form has been saved, a shortcode will be visible on the content tab. You can copy/paste this shortcode onto any post or page to show the form.

FAQ

I am not receiving emails

HDForms uses WordPress’ built-in wp_mail() function to send emails. This means that if your site or server is not properly configured, then not only will HDForms not be able to send email, but WordPress itself won’t be able to either.

The first thing to do is install the Check Email plugin to test your site settings. The error message you get will help you find out where the issue lies.

The most likely culprit is SMTP. The WP Mail SMTP may help you set up your SMTP settings.

I have a feature request!

Please submit your feature request here by using the support tab to the right.

Keywords

hdforms, form, form builder, contact, contact form, hdf, hd form, hdform, contact builder, contact form builder, send contact form

Contributors & Developers

“HDForms | Contact Form Builder” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.2

  • October 19th 2018
  • Improvments to HTML email
  • Improvments to form actions
  • Updated readme for help and tutorial

0.1

  • October 18th 2018
  • initial release