WHOIS: cForms Integration

You can integrate the WordPress cForms plugin with our WordPress WHOIS plugin for easy flow of domain registrations.

When a user searches for a domain which is Available (not registered), it will redirect to a cForms custom form on your site and pre-fill or auto-fill the domain name that was searched for.

Integration Requirements

Follow the steps below to set up the cForms integration with the WHOIS plugin.

Configure your WHOIS plugin

Once you’ve installed and activated your WordPress WHOIS plugin, go to Tools > WHOIS in your WordPress dashboard.

click to enlarge

Under ‘General Settings‘, scroll down until you see a setting named ‘Redirect When “Available”‘ and set it to ‘Yes‘. Two additional settings will then appear named ‘Redirect URL‘ and ‘Redirect Target‘.

Redirect URL

The value of this field must be the URL to the cForms custom form on your site which you’re going to create in Step 2 below. So in the meanwhile you can go to “Pages” in WordPress and create a new page where you’re going to put your cForms shortcode later in Step 2.

Added to the end of the URL must be the following string:


Redirect Target

Simply choose whether the ‘Redirect URL‘ setting value must be opened in the current window/tab in the browser or in a new window/tab in the browser.

Create your cForms form

Once you’ve installed and activated the cForms plugin, go to cForms > Form Settings in your WordPress dashboard.

You’ll notice that cForms has a default form there which you can just edit or you can create a new custom form for this exact purpose.

Add a field in the form for the domain name which you can name “Domain” or whichever you prefer. Then click the little pencil icon to the right of the field to edit the field and in the ‘Default Value‘ field fill in {domain} just like that.

When you’re done configuring your form according to your needs, click the “Update Settings” button to the right to save the form settings.

Now go back to the WordPress page you created in Step 1 for the cForms form and put the form into the page with it’s code. There is a cForms button/link in the editor you can use or you can just add the tag in HTML view of the editor like this:

<!--cforms name="My Form"-->

Where “My Form” should be replaced with the name of the form.

Make a code edit in the cForms plugin

Connect to your server via FTP so that you can see all the files and folders in the WordPress installation. Go to wp-content/plugins/cforms/ and open the file named lib_aux.php

Find the function named function check_default_vars() and just before the last return in the function at the bottom of the function on approximately line #445 add the following code:

$m = str_replace('{domain}', $_GET['domain'] . '.' . $_GET['tld'], $m);

You can get the code here.
Then it should look like this:

And that’s it, try out the WHOIS search and the redirect and you can watch the video in the “Result” here to see how it should behave.

Integration results

[vimeo width=”620″ height=”460″]http://vimeo.com/26720229[/vimeo]

Beautiful Newsletter Templates

Professional newsletter templates that are fully responsive for desktop, tablet, and mobile. They are 100% cross-client compatible.

See Them

Pin It on Pinterest