Plugin Documentation

Detailed documentation about all features and settings of CP Contact Form with PayPal.

How it works?

From the dashboard/configuration area the process is as follows:

Insert data fields into the form

Configure the general form processing, email and PayPal settings if needed

Publish the form from a post or page (go to edit posts or pages).

From the end user (visitor) point of view, the process is as follows:

The user fills the data fields

If PayPal integration isn't enabled:

The user clicks "submit" and you (the website owner or administrator) receive a notification email with the data posted by the user.

The user receives an automatic "confirmation/thank you" email.

The user is redirected to a "confirmation/thank you" page into your WordPress website

If PayPal integration is enabled:

The user clicks "submit" and is automatically sent to PayPal for the payment

In background (transparent to the user): The request is saved into the local database and mark as "un-paid"

The user completes the payment at PayPal

In background (transparent to the user): Upon completed the payment, you (the website owner or administrator) receive a notification email with the data posted by the user.

In background (transparent to the user): The request is marked as "paid".

The user receives an automatic "confirmation/thank you" email.

The user returns to a "confirmation/thank you" page into your WordPress website

Installation

To install the WordPress plugin follow these steps:

Download the plugin to your computer.

Go to the plugins section in WordPress

If has been installed installed another version of the plugin, deactivate it, and then press the corresponding "Delete" button.

Press the "Add New" button at top of section.

Press the "Upload Plugin" button, and select the zipped file downloaded in the first step.

Finally, install and activate the plugin.

Inserting the form on Page

Configure the settings at the administration menu >> Settings >> CP Contact Form with PayPal.

To insert a form into some pages or posts, uses the icon that will appear when editing contents:

After doing that, the tag [CP_CONTACT_FORM_PAYPAL id="1"] will be inserted into your content. The "id" is optional, if not specified the first form will be used. When you preview the content in the public website that tag will be replaced by the reservation form:

Managing Forms

After going to the WordPress administration menu >> Settings >> CP Contact Form with PayPal you will see the list of forms like in the following image:

For each form you will see the following options:

ID: Identification number of the form, useful when publishing an specific contact form.

Form Name: Name to identify the form. Visible only from the admin area.

Update: Updates the form name.

Settings: For managing the form settings.

Clone: Duplicate/clone a form.

Messages: Printable list of messages (both paid and unpaid).

Delete: Deletes the form and all its messages and settings.

Shortcode: An alternative way for publishing the form.

After clicking the "Settings" button you will jump to a new page with the form builder a other configuration options as explained below.

Check the submissions

Press the "Messages" button, corresponding to the form. The messages screen displays the list of submissions, and a filtering section to reduce the submissions by form, a time interval, or a text in the data

From the messages screen it is possible remove a submission, or submissions group, change its status to paid/unpaid, but from this screen is possible export all submissions to a CSV file

Export the submissions to a CSV File

For exporting the submitted information to a CSV file, press the "Messages" button corresponding to the form, and press the "Export to CSV" button, select the location where will be saved the CSV and that's all. The first row of CSV file allows identify each of fields, the text used to identify the field will be the short label, defined in the field, or the label in case that the short label is not defined.

The Form Builder

The Form Builder lets you to add/edit/remove fields into the form and also to specify the validation rules for your form (required fields, email fields, etc...).

Form title and predefined designs

The "Form Settings" tab allows define the form's title and description, as the placement of labels respect the fields (at top, at left, aligned to the right). In the "Form Settings" tab is possible to decide the form's design. The plugin includes multiple predefined designs.

The following field types are currently available(*):

Single Line Text: Classic text input.

Number: This field can validate if only digits or a valid number was entered.

Slider: Numeric field whose value is modified sliding a handle.

Currency: A classic input field for currency values, that allows separator for thousands, and currency symbols.

Hidden: A hidden field.

Email: This field validates that the email address has a valid format.

Date/Time: Date-picker. Can be setup also to show also a selectable year and month, for example for birth date fields, and time fields.

Checkboxes: Classic checkboxes, select one or more on a group.

Multiple Choice: Radio buttons, select one of many.

Dropdown: Classic select / dropdown field.

Upload File: For uploading files.

Password: A field that shows * instead the typed letters. You can also add a confirm password validation.

Phone field: Supports international formats line ###-###-#####. The format is configurable.

Comment area: It's a comment to introduce to a section of the form or give instructions to the user.

Summary: Displays a summary of form fields with the values entered.

Section Break: It's a line for separating areas group of fields

Page Break: Useful for creating multi-page forms. The "page break" marks the start of a new page in the form builder

Instruct. Text: Text field to display instructions for users.

HTML Content: Field for general purpose, to include HTML tags in the form.

Media: Allows insert images, audios or videos.

Button: Insert a button in the form.

* Note: Some of the field types are available only in the Developer and Platinum versions of the plugin.

Container Fields

The form builder includes some container controls. The container controls allow to insert another controls in them:

Fieldset Container: Allows insert a fieldset control in the form, with a legend.

Div Container: Inserts a container very useful for grouping related controls, and not modifies the appearance of the form.

DataSource Fields

In addition to the above, the following fields are available only in the Developer and Platinum versions of plugin:

Line Text DS: An input field that gets its default values from one of following datasources - Database, Posts information, Taxonomies information or Users information.

Number DS: An input field that gets its default values from one of following datasources - Database, Posts information, Taxonomies information or Users information.

Email DS: An input field for Email address that gets its default values from one of following datasources - Database or Users information.

Text Area DS: A text area field that gets its default values from one of following datasources - Database, Posts information.

Checkboxes DS: Checkboxes for selecting one or more options into the same field that gets its options from one of following datasources - Database, CSV, Posts information, Taxonomies information or Users information.

Radio Btns DS: Radiobuttons for selecting one option between the options available for the field that gets its options from one of following datasources - Database, CSV, Posts information, Taxonomies information or Users information.

Drop-down DS: A select / drop down list for selecting one of the values listed that gets its options from one of following datasources - Database, CSV, Posts information, Taxonomies information or Users information.

Hidden DS: A hidden field that gets its value from one of following datasources - Database, Posts information, Taxonomies information, or Users information.

Editing the field settings in the Form Builder

When you click a field already added, you can edit its details and validation rules. The following properties are useful:

Field Label: Label for the field in the public form and into the email.

Field tag for the message: In addition to the general <%INFO%> tag, you can use this tag to show the field value into a specific tag of the email.

Specific settings: The settings depends of the field type, for example the format of the phone number, the date format, etc...

Instructions for user: This text will appear in a smaller form below the field. It's useful for giving instructions to the user.

Add CSS layout keywords: Customize the look & feel. If used, this field must contain the name of the CSS class and not the styles rules directly.

Other features in the form builder:

Equal fields validation: Use it for example to confirm if the email or password typed in two different fields are the same. This is valid for "Single Line Text", "Password" and "Email" fields.

Dependent fields: Use this feature for show/hide fields (any field type) based in the selection made on other fields (checkboxes, radiobuttons or select/drop-down fields).

For DataSource controls (only available in the Developer and Platinum versions of plugin)

This is a step by step about the use of datasource controls

Insert in the form the control with access to external datasources (these controls are represented with the DS at the end of its names)

Select the control in the form, and pays attention to the "Define Datasource" section.

There are different datasources: Database, CSV file, Post Type, Taxonomy, and User Data.

Database, allows populate the field with the data stored in database.

CSV, allows populate the field with the data stored in a CSV file (Datasource available only in fields with multiple entries: DropDown DS, Checkbox DS, Radio Button DS).

Post Type, allows populate the field with the information associated to a specific post type (like the products names in a Woocommerce, etc.)

Taxonomy, allows populate the field with the information of taxonomies.

And finally the User Data, with the data of users in WordPress.

Note: Depending of control selected will be available all available datasources, or not.

So, suppose we want populate the field with the data stored in a database table.

Select Database, from the list of datasources.

If the database is different that used by WordPress, will be required enter the Host's address, the authentication data to connect to the database (username and password), and the name of database(a host can include multiple databases). There is a button for testing the database connection.

Note: If the database is the same used by WordPress, leave empty the fields above.

Now its time to define the query to database

Enter the name of table's column, that store the control's values. If you are using the Drop-down DS control, it has multiple options; each option of drop-down list includes a value and text; in this option you determine the column in the table that includes the values of options.

Enter the column's name that stores the control's texts. Similar to the previous step, but in this case the column stores the texts of the options (in case of checkbox or radio buttons, this column contain the label of options)

Type the table name, a database can include multiple tables, you should identify the table you are using.

Type a condition if required. If you want filtering the values to display in the control, type the condition in this attribute. For example, suppose you want load the data of posts that are public, the condition in this case would be: post_status='publish', where post_status is the name of column, and publish is the value for filtering.

The "Order by" is used to order the query results by the values in columns, and not by the order that data were stored in database. For example, suppose you want populate the control with the users names of WordPress, and you want order the results alphabetically, in this case the "order by" would be: display_name ASC, where display_name is the column's name, and will be ordered in ascending way.

Limit, enter an integer number to reduce the number of query results.

If your query is very complex, and you prefer create it manually; selects the option "Custom Query", but in this case you should type all the query. Pay attention because you should use alias in the "SELECT" clause, to indicate the colum used to get the values, and the column used to get the texts. For example, a hypothetical query:

SELECT column1 AS value, column2 AS text FROM tablename WHERE column3 > 5 ORDER BY column2 ASC LIMIT 5

The use of database as datasource, allows filtering the information to populate the fields with the values on other fields in the form, or javascript variable. The use of variables are only accepted in the "Condition" section ("WHERE" clause), and requires the format: <%varname%>. For example, to get the title of a post, filtering by its ID, if the id is defined through the fieldname3 field, the "Condition" attribute of the query would be: ID=<%fieldname3%>

How to use CSV files as datasource?

The CSV files can be used as data sources for fields with multiple choices (DropDown DS, Radio Btns DS, Checkboxes DS). The initial steps are similar to the previous section, but selecting the "CSV" option as data-source instead of selecting "Database".

A comma-separated values (CSV) file stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator is the source of the name for this file format.

For CSV files, the plugin includes the attributes:

Select CSV file: file field to select the CSV file.

Use headline: tick the checkbox if the first line of CSV file is a headline to identify the data in the next records.

Delimiter: enter the delimiter symbol used as the field separator on each record.

Press the "Import CSV" button to import the records into the form. This action will feed the lists "Select column for texts" and "Select column for values", that are used for selecting which fields will be used texts and values of the choices in the DS field.

Create dependencies between fields

Some fields, like radio groups, checkboxes and drop-down menu, allow dependencies in function to the option selected.

For example, suppose your form includes a radio-group control with multiple choices: - House, - Car, - Electrodomestics, and each of them, uses different attributes. The house requires fields for address, number of rooms, etc; the car requires a field for trademark, model, etc. and finally the electrodomestics, will need type of electrodomestic,and more. So, if you want display the fields, depending of choice selected:

Select the radio group fied in the form editor.

Press the "Show dependencies" link, in the choices area.

and select the field to display if the choice is selected. If you need associate multiple fields to the choice, press the plus button and select the new fields.

Settings area of the forms

For each form you will be able to edit the following settings:

Form Builder: Already explained in the previous sections (see above).

Validation Settings:

This area contains the "texts" used for the validations. You can easily translate them to other languages.

is required: Error message for required field.

is email: Error message for email format.

is valid date (mm/dd/yyyy): Error message for date format.

is valid date (dd/mm/yyyy): Error message for date format.

is number: Error message if the value is not a number.

only digits: Error message if the value has not only digits.

under maximum: Error message if the value is not in the correct interval.

over minimum: Error message if the value is not in the correct interval.

PayPal Payment Configuration:

When should be sent the notification-confirmation emails?: Select if you want to receive the email before or after receiving the PayPal payment.

PayPal mode: Select here if you want to process real payments (production mode) or you want to test the form with the PayPal Sandbox.

PayPal email: The email of the PayPal that will receive the payments.

Request cost: Payment amount requested to confirm a booking.

Automatically identify prices on dropdown and checkboxes? If marked, any price in the selected checkboxes, radiobuttons and dropdown fields will be added to the above request cost. Prices will be identified if are entered in the format $NNNN.NN, example: $30 , $24.99 and also $1,499.99

Use a specific field from the form for the payment amount: If selected, any price in the selected field will be added to the above request cost. Use this field for example for having an open donation amount.

Currency: The currency, example: USD, EUR, GBP, etc...

Taxes (percent): Taxes percent to apply at PayPal, if any.

Request address at PayPal: Select if you want to request the customer address at PayPal.

A $0 amount to pay means: Select "skip payment" for accepting 100% discount codes or select "let the user enter any amount" for accepting donations or open payment amounts. The "Base Amount" attribute has precedence over this attribute.

PayPal product name: The name that will appear to the customer at PayPal. It is possible to define the name of the product through a field in the form. For example, for defining the product name with the value entered in the fieldname3 field, should be entered the special tag <fieldname3> as the value of this attribute.

PayPal language: The language that will be used for the PayPal payment. It's any PayPal supported language.

Payment frequency: Select here if you will be requesting a one-time payment or a recurrent/subscription payment.

For recurring payments it is possible define a first period price different to the next recurring payments.

Discount Codes: Use this section to define the accepted discount codes and the discount percent. A 100% discount means that the payment isn't required.

PayPal Pro Integration

With the PayPal Pro Integration (only Developer and Platinum versions of the plugin) you can insert a form into a WordPress website and use it to process credit card payments directly into your website without navigating to an external payment page.

For integrating PayPal Pro you must have a PayPal Pro account. In addition to that a SSL connection is also needed, the SSL connection isn't a technical requirement since the plugin can work without it but anyway it is strongly recommended for accepting credit cards into your website, otherwise the transactions won't be secure.

In the settings area the following information is needed to activate and link the PayPal Pro account to the form:

When enabled, the form on the public website will display an additional set of fields to request the data needed to process the payment, like for example the billing address, credit card details. This info is only for the payment processing, as mentioned it won't be stored into the website for security reasons.

After the submission Once the payment is processed and the posted data (excluding the credit card related information) is saved into the WordPress database.

Form Processing / Email Settings:

"from" email: The email used as from in the notifications.

It is strongly recommended the use of an email address in the website's domain. The main emails services (as Gmail, Hotmail, Yahoo, MSN, etc.) check the correspondence between the email address in the "Sender" header on emails, and the domains that send the emails. If the correspondence fails, the emails can be managed as Spam or as a "Phishing" email, in whose case would be deleted for security reasons.

Destination emails (comma separated): List of administrators that will receive the email notification.

Email subject: Subject of the notification email sent after completing the payment.

Include additional information?: Optional information about the user IP and browser.

Thank you page (after sending the message): After the completing the payment the user may go back to a page into your website (usually a "thank you" page). Type the page address into this field.

Email format? Select if the email will be sent as plain-text or HTML-formatted.

Message: Content of the notification email that you will receive. Keep the tag <%INFO%>, it will be replaced automatically with the form data send by the user.

Email Copy to User:

Send confirmation/thank you message to user?: Select if you want to sent the "confirmation/thank you" message to the user.

Email field on the form: Select here the field that contains the user's email on the form.

Email subject: Subject of the email sent to the user after payment

Email format? Select if the email will be sent as plain-text or HTML-formatted.

Message: Content of the email sent to the user after payment. The tag <%INFO%> will be replaced by the information sent using the form, if needed.

Captcha Settings:

Use Captcha Verification?: Select if the captcha image will be used.

Width: Width of the captcha image.

Height: Height of the captcha image.

Chars: How many characters will appear in the captcha image.

Min font size: Minimum size used for the font (randomized).

Max font size: Maximum size used for the font (randomized).

Preview: Preview for checking how the captcha image will look.

Noise: Amount of noise to make it stronger.

Noise Length: Length of the noise to modify its look.

Background: Background color.

Border: Border color.

Font: Base font used to render the text. Four options already included.

Special tags in the notification emails

There are special tags that can be used in the notification emails to display the forms information:

<%INFO%>, the tag <%INFO%> is replaced by the labels and values of fields that are submitted from the form.

To insert only specific fields, use the format <%fieldname#%>, for example, if you want include the fieldname1 and fieldname3 in the notification email, use the tags <%fieldname1%>, and <%fieldname3%>, the tag will be replace by value of field.

To display the final price posted to PayPal, after apply the discount if was defined, use the tag <%Cost%>

To display the tax posted to PayPal, use the tag <%Costtax%>

To display the coupon/discount applied, if was applied a discount, uses the tag <%coupon%>

To display the payment option selected, in case that PayPal has been set as optional, use the tag <%payment_type%>

To include an unique number that identifies the submitted data into the system, uses the tag <itemnumber>. This number allows to identify easier the PayPal transference, and could be used as an order reference.

To display the tax posted to PayPal, use the tag <%Costtax%>

Other tags supported are:

<%user_login%>: Username of the user logged in to the site that made the submission (if any)

<%user_id%>: ID of the user logged in to the site that made the submission (if any)

<%user_email%>: Email of the user logged in to the site that made the submission (if any)

<%user_firstname%>: Firstname of the user logged in to the site that made the submission (if any)

<%user_lastname%>: Lastname of the user logged in to the site that made the submission (if any)

<%display_name%>: Display name of the user logged in to the site that made the submission (if any)

Add-Ons

The list of add-ons available in the plugin, appear in the "Add-ons area" of settings page of the plugin. For enabling the add-ons, simply should tick the corresponding checkboxes, and press the "Activate/Deactivate Addons" button.

WooCommerce add-on (Beta Version)

The Platinum version of the plugin includes the WooCommerce add-on, to integrate the forms created by the "CP Contact Form with PayPal" with the WooCommerce products. The add-on inserts an additional metabox in the WooCommerce products, with two settings fields:

Enter the ID of the form: Allows select the form that will be associated to the product.

Calculate the product price through the form: Allows calculate the price of the products through the form.

Minimum price allowed: The minimum price applied to a product.

Activate the summary: Allows customize the fields included in the cart page of WooCommerce.

Summary title: Enter the summary title.

Summary: Define the summary, are accepted all special tags supported by the notification emails and the thank you page.

Note: If you want calculate the price of products through the form, will be required that you select the field of the price in the attribute: "Request cost" in the form's settings.

SalesForce add-on (Beta Version)

The add-on allows create new leads in the SalesForce account with the data submitted by the forms.

To create new leads in SalesForce with the data submitted by a form, be sure that the SalesForce account has enabled the Web-to-lead option, and then go to the form's settings:

Enter the OID (Organization ID)

For debugging the lead creation, tick the "Enabling debug" option, and enter the email address where receive the information. For production, untick the debugging option.

Press the "Add attribute" button, select the Lead attribute, and enter a fixed text, or the name of the field in the form (fieldname#)

Note: The Add-on includes the list of predefined attributes of Leads, but it is possible to enter custom attributes too.

WebHook add-on (Beta Version)

The add-on allows posting the submitted information by the forms to WebHooks URLs. With the WebHook add-on it is possible integrate the forms created by the plugin with services like Zapier. The Zapier connects services as important and popular as Zoho CRM, Dropbox, Mailchimp, Evernote, Google Drive, Facebook, Twitter, and more than 300 services(Zapier apps)

Use this add-on is as simple as entering the WebHooks URLs, through the WebHook section in the forms settings. To associate a form with multiple WebHooks, simply press the "Add new url" button, to add a new input field.

Note: About Zapier service, select Webhook as the Trigger app, and "Catch Hook" as the trigger for this app.

reCAPTCHA add-on (Beta Version)

The add-on allows to protect the forms using the Google reCAPTCHA instead of the captcha distributed with the plugin. reCAPTCHA is more visual and intuitive than the traditional captcha, with just a single click the users confirm they are not a robot.

reCAPTCHA (its official name is No CAPTCHA reCAPTCHA) as they define themselves:

reCAPTCHA is a free service that protects your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.

To use reCAPTCHA in your forms, activate the add-on in the the settings page of the plugin, through the menu option: "Settings/CP Contact Form with PayPal", tick the checkbox: "reCAPTCHA", and press the "Update" button.

The activation of reCAPTCHA displays a new section for entering the site key, and the secret key, two keys provided by Google reCAPTCHA to protect the website, and validate the forms submissions respectively.

Mollie (iDeal)

The Mollie addon provides integration with iDeal, the most popular Dutch payment method. The integration is made via Mollie: www.mollie.com.

After the consumer selects the iDEAL payment method the consumer's bank is selected. The actual payment then takes place in the bank's trusted online banking environment - for which security is guaranteed by the bank. Through iDEAL buyer and seller are guaranteed a transparent transaction without hidden fees or other unpleasant surprises.

In the settings area the following information is needed to activate and link the Mollie - iDeal account to the form: