Installing a Contact form on your DokuWiki site can be somewhat complex. DokuWiki does not have any contact form capability built into their software. In order for you to get a contact form on your DokuWiki site, you will need to use a plugin.  This tutorial will explain how to use the Modern Contact plugin for DokuWiki.

Steps to use the Modern Contact plugin

Download and Install the plugin

In order to create a contact form in your wiki you will need to use the Modern Contact plugin. The following explains where to download and how to install the plugin.

  1. Contact form plugin download DokuWikiVisit the following url where the plugin can be downloaded from.

    https://www.dokuwiki.org/plugin:contactmodern

    Click the Download link.


  2. Copy the Modern Plugin link DokuWikiGet the URL for the plugin. You can right click the download link and copy the Link Location or get the link from the browser address bar. The link for the plugin should look like the following.

    https://github.com/downloads/marvinrabe/dokuwiki-contact/moderncontact_2012-06-06.zip


  3. textLog into DokuWiki.

    Click the Admin link at the top right side.

    Select the "Manage Plugins" link.


  4. Install Modern Contact plugin DokuWikiPaste the URL you obtained from the plugin download site in the "Download and install a new plugin" box.

    Click Download.


    Green success DokuWikiYou should see a green confirmation saying, "Plugin package (2 plugin(s
    ): __MACOSX,moderncontact) successfully installed
    ".


    Installed plugins DokuWikiNow the plugin will show in the "Installed plugins" list.

Add Modern Contact plugin code

Once you have the Modern Contact plugin installed, you can add the code to your wiki page that is designed to store your Contact form. The following are example codes you can use in your wiki Contact page.

{{contact>}}
{{contact>subj=Contact the Developer}}}
{{contact>to=Admin|subj=Contact the Developer}}

The table below has a brief description of the attributes available for the contact form code.

AttributeDescription
subj This will allow the subject to be specified in the form removing the subject input from the contact form.
to The username can be specified here for having a specific user receive the email from the form.
captcha This can be set to True or False. True will display the reCAPTCHA and false will hide it.

Below are the steps to add the code to your wiki page.

  1. Find the page you want to add the contact form to and edit it.
  2. Add code to your wiki page DokuWikiTo have the basic form display, add the following code to your page.
    {{contact>}}

    Save the changes.

    Before the contact form will display on your page, you will need to fix the code in the plugin. The following will explain how to fix the plugin code.


Fixing the Modern Contact plugin code

To fix the code, we will need to "find and replace" a specific code in one of the files of the plugin. This is because the plugin developers have not created a fix for a bug in the plugin.

Important! When using find and replace, its important to make sure you typed the words correctly and that you have a backup of the plugin. Find and replace cannot be undone so be careful.

Below are the steps to take for finding and replacing the code to make the Modern Contact form to work.

  1. Login into your cPanel.
  2. Go to the File Manager. Select your DokuWiki installation directory and click go.
  3. Navigate to the following file location.

    lib/plugins/moderncontact/syntax.php

    Open the file in the code editor.

  4. Find and replace bad code DokuWikiPress Ctrl + F on your keyboard to open the find and replace box. Find and replace the following code:
    contactmodern

    Replace it with the following:

    moderncontact

    Open the file in the code editor.

    Save the changes.


Configure the Modern Contact plugin Settings

In order for the Contact form to work completely, you will need to configure the plugin. You can get a "reCAPTCHA" key from Google to have the "reCAPTCHA" work on your form. The below steps will explain how to configure the Modern Contact plugin.

For more information on the Google "reCAPTCHA" private and public keys, please see our article on How to get the public and private keys for Google reCAPTCHA.

  1. Log into DokuWiki.
  2. Click the Admin link at the top right.

    Select the Configuration Manager.

  3. Configure plugin settings DokuWikiScroll to the bottom where it has the Moderncontact Plugin Settings.

    Here is where you configure the plugin. You can change the default email address for the contact form and enable the captcha here. This is where you will use your Google "reCAPTCHA" public and private keys.

    Save the changes.


    View of Modern Contact Plugin DokuWikiNow when you visit the page where you placed the contact form code, you will see the basic contact form show.

Continued Education in Course 104: Adding a contact form in DokuWiki
You are viewing Section 1: Installing the Modern Contact plugin in DokuWiki
Installing the captcha plugin in DokuWiki
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!