To Install The Postcodes4u Plugin
- 01Install the plugin from your wordpress admin panel.
OR
- 02Upload the Postcodes4U plugin folder to the /wp-content/plugins/ directory
- 03Activate the plugin through the ‘Plugins’ menu in WordPress
Once the plugin has been activated a new page ‘Postcodes4u’ is created. This page, which is visible to admin only, can be used to do local address lookups.
Configure Postcodes4u
The configuration settings for the Postcodes4u plugin can be accessed from the Postcodes4U page in the Settings menu.
Once Installed you will need to enter your Postcodes4U key and username which can be obtained from http://www.postcodes4u.co.uk .
When the key and user name has been entered, and your have turned ‘on’ Postcodes4u lookups (Postcodes4u Active) you can use the various integration options to add postcode lookups to your WordPress website.
If you wish to see how the Postcodes4u Postcode Lookup works before creating a Postcodes4u account, then use our ‘Test’ Postcodes AA901XX, AA902XX, AA903XX and AA901XX.
WooCoommerce Integration
If you have WooCommerce installed and have have enabled WooCommerce Integration on the Postcodes4U page in the Settings menu your customers can use post code lookups in the checkout billing and shipping addresses to ensure accurate entry details.
There are additional options that allow you to control where the Postcodes4u postcode lookup will be displayed so it can better match you Theme.
Contact Form 7 Integration
If you have Contact Form 7 installed and have enabled Contact Form 7 Integration on the Postcodes4U page in the Settings menu you can add postcode lookup to a Contact Form.
This is displayed in detail in the following document. http://www.postcodes4u.co.uk/support/Pc4u_CF7_SetupNotes.pdf .
This is summarised below:
First add the Postcodes4u address to the form where the Postcode field and Address selction dropdown is to be displayed using the new ‘field type/short code’ ‘pc4upostcode’.
[pc4upostcode Postcode]
The form fields fields that will contain the address details for the address lookup need to be set up with ID values
For the Company Name the field ID is pc4uCf7Company
… for Address Line 1 the ID is pc4uCF7Address1
… for Address Line 2 the ID is pc4uCF7Address2
… for Address Line 3 the ID is pc4uCF7Address3
… for Town/City the ID is pc4uCF7City
… for County the ID is pc4uCF7County
Please Note You only need to include the fields you need for the form, eg for a short address form you could just include Address Line1 , Address Line2 , Town/City and Postcode
..You just need to ensure that the required address fields are also in the email template
If you want to make the Postcode field ‘required’ simply place a ‘*’ after the postcode field eg [pc4upostcode* Postcode]
GravityForms Integration
If you have Gravity Forms installed and have enabled Gravity Forms Integration on the Postcodes4U page in the Settings menu you can add a Address Field with postcode lookup to a Gravity Form.
The plugin has replaced ‘ Address ‘ advanced field with ‘ Pc4u Address ‘. All existing Address fields will work as before, but now have Postcodes4u Lookup options available, together with a UK address option. The Postcodes4u lookup options are on the ‘Appearance’ tab of the Address field in the form. This includes controls to locally enable/disable the Postcode lookup on an individual address field, together with advanced positioning option,
This is displayed in detail in the following document, and it is recommended that you read these notes. http://www.postcodes4u.co.uk/support/Pc4u_GravityForms_SetupNotes.pdf .
Postcodes4u Contact Form
We have provided a Customisable Postcode Lookup Contact form that can be added by simply placing a short code ‘[pc4u_contact_form]’ on the required page. Full details on the customisation settings for the contact form are described in ‘Other Notes’.
To Add the Postcode Lookup Contact form use the following shortcode:
[pc4u_contact_form]
By default the short code will display the telephone and postal address fields but does not require them be be entered when the contact form is submitted.
To add a Contact Form that requires the telephone number and postal address to be present use the short code with attributes shown below:
[pc4u_contact_form musthavetelephone=”YES” musthaveaddress=”YES]
Postcodes4u Contact Form Customisation
A full list of the contact form attributes
contacttitle – Name of Contact Form – defaults to “Contact Us”
subjecttitle – Contact Form Subject Title – defaults to “Subject”
messagetitle – Contact Form Message Title – defaults to “Your Message”
showtelephone – Set to “TRUE” or “YES” to display telephone number input area, “FALSE” or “NO” to not display – Default is “YES”
musthavetelephone – Set to “TRUE” or “YES” if a telephone number must be included in the message,”FALSE” or “NO” to not display – Default is “NO”
showaddress – Set to “TRUE” or “YES” to display postal address input area, “FALSE” or “NO” to not display – Default is “YES”
musthaveaddress – Set to “TRUE” or “YES” if a postal address must be included in the message,”FALSE” or “NO” to not display – Default is “NO”
A Contact Form Shortcode example that sets all of the parameters follows:
[pc4u_contact_form contacttitle=”Send Us A Message” subjecttitle=”Message Subject” messagetitle=”Message” showtelephone=”YES” musthavetelephone=”YES” showaddress=”YES” musthaveaddress=”YES”]