how to create a contact or enquiry form in wordpress

Contact or enquiry form is the most important part of any website which can be used to get feedback directly from the client. So if you want to add a contact or enquiry form on your website then “Contact Form 7” plugin is easy to use and integrate on the website.

Here are steps to integrate Contact Form 7:

  1. Download the Contact Form 7. Click here to download the Contact Form 7 plugin.
  2. Once the download completed, just login into admin panel and go to “plugins->add new”.
  3. On this page, just click on the “upload plugin” and now “choose file”.
  4. Now select the downloaded plugin  file and click on “Install now” and then activate the plugin.
  5. Till now, we have install the plugin on our wordpress based website.
  6. Once the plugin installation completed, you will see the option “Contact” on left side navigation bar.
    Contact Form 7 WordPress Plugin
    Contact Form 7 WordPress Plugin

     

  7. Now you can add multiple forms by clicking on the “Add New” button.
  8. So now just click on the “Add New” button and you will see the following screen:Contact Form 7 add new form
  9. Now, you can enter the contact form title as shown in the pic.Contact Form 7 add new form on website
  10. Once you click on “save” button form will be generated with the default fields as mentioned in the pic above.
  11. Now a shortcode will be generated for the newly created form with the name we mentioned in the form title. wordpress contact form 7 shortcode
  12. Here is the default shortcode generated while installing contact form 7 plugin

Now the new form has been added on the website. The sample for you can check in the following pic:

contact form 7 new form added

So, finally your contact form if ready to use on your website. We hope all points has been clarified here and you will be able to integrate the contact or enquiry form on your website.

 

 

How to add text editor for contact form 7 in wordpress

If you are using contact form 7 plugin in your wordpress based website then sometimes you may also need to add a text editor for the textarea field.

Add text editor for contact form 7

Adding a text editor for contact form 7 is quite easy and this can be done using a wordpress plugin “Rich Text Editor Field for Contact Form 7“. So you just need to install and configure this plugin to add a text editor in your contact form 7.

Here are steps you configure the plugin.

  1. In first step, you will download the plugin. Click here to download the plugin.
  2. Now you need to install the plugin. If you don’t know how to install a wordpress plugin then you can visit this article: How to install a wordpress plguin in wordpress.
  3. Once you complete your plugin installation process, go to “contact->Contact Forms” given in the left side navigation in admin panel as shown in the following screenshot:How to add text editor for contact form 7 in wordpress
  4. Now you will see the list of all the forms created using the contact form 7 plugin and here click on “Edit” option as shown in the following screenshot: Add text editor
  5. Once you click on the “Edit” option, you will see the form details and also there will be an option “Rich Text Editor” as shown in the following screenshot:Rich text editor option
  6. So now just click on “Rich Text Editor” option and now it will display you the option to generate a text editor field. If its a compulsory field then “tick mark” the “required field” checkbox. You can also change the default filed name by typing in the “Name” filed textbox. And finally it will generate a field Tag with all the details we specify as shown in the following screenshot: Generate text editor field
  7. So now, just copy the field Tag and paste it where you want to add text editor field as shown in the following screenshot: Add text editor field
  8. Finally click on the “Save” button given in the right side of the page. See the following screenshot: Save the updates
  9. Here is the front-end display of the contact form 7form with text editor option
  10. So finally we are all done and we hope you will be able to add a text editor field in your form in required.

PHP string function hebrevc

The String function hebrevc() converts Hebrew text from right-to-left (RTL) to left-to-right(LTR).

Syntax

Parameter Description
hebrew_str This is a required parameter which defines the Hebrew string.
chars_per_line  This is an optional parameter which defines the maximum characters for each line.

Return Value

It will return the visual string.

PHP Version: PHP 4, PHP 5, PHP 7

PHP string function str_repeat

The String function strpos() repeats a string for a specified number of times.

Syntax

Parameter Description
mystr This is a required parameter which defines the string to repeat.
multiplier This is a required parameter which defines the number of times the string will be repeated and the number should be >=0

Return Value

It will return the string after repeating it for the number of times specified in the multiplier parameter.

Example

PHP Version: PHP 4, PHP 5, PHP 7

PHP string function strip_tags

The String function strip_tags() removes the HTML, PHP and XML tags from the given string.

Syntax

Parameter Description
mystr This is a required parameter which defines the string to check.
tags This is an optional parameter which defines the allowable tags and these tags will not be removed from the string.

Return Value

It will return the string after removing the Tags.

Example

 

PHP string function rtrim

The String function rtrim() removed the white spaces or any other character from the right side of the string.

Syntax

Parameter Description
mystr This is a required parameter which defines the string to check.
 characters This is an optional parameter which defines the characters to remove from the string.

If we don’t define the 2nd parameter then this function will only will strip the following characters:

  • “\n” – a new line
  • “\t” – a tab
  • “\r” – a carriage return
  • “\x0B” – a vertical tab
  • “\0” – NULL values
  • ” ” – an ordinary blank space

Return Value

It will return the modified string as per the 2nd parameter.

Example

 

PHP string function soundex

The String function soundex() calculates the soundex key of any string.

Syntax

Parameter Description
mystring This is a required parameter which defines the string to check.

Return Value

It will return the soundex key of the string.

A soundex key is a four character alphanumeric string which represent English pronunciation of any word specified in the function.

Example

 

Note: This function may create the same key for the almost similar sounding words.

 

PHP string function strtoupper

The String function strtoupper() will convert all the lowercase letters to uppercase letters.

Syntax

Parameter Description
mystring This is a required parameter which defines the string to convert to uppercase letters.

Return Value

This function will return the whole string in uppercase letters.

Example

 

NOTE: This function is binary-safe.

 

PHP string function strncasecmp

The String function strncasecmp() is used to do a case insensitive string comparison.

Syntax

Parameter Description
mystr1 This is a required parameter which defines the first string to compare.
mystr2 This is a required parameter which defines the second string to compare.
len  This is a required parameter which defines the lenght of the string used to compare the two strings.

Return Value

This function will return < 0 if the mystr1 is less than mystr2; > 0 if mystr1 is greater than mystr2, and zero (0) if they are equal.

Example

Example 2

 

 

PHP string function strcspn

The String function strcspn() is used to count the number of characters including white spaces in a string.

Syntax

Parameter Description
mystring This is the required parameter which specifies the string to search.
char This is the required parameter which specifies characters to search for in the string.
start This is an optional parameter which specifies  from where in the string to start searching.
length This is an optional parameter which specifies  length of the string.

Return Value

It will returns the length of the string before any part of the specified character.

Example

NOTE: This function is binary-safe