Changeset 1564814
- Timestamp:
- 12/30/2016 07:27:49 AM (9 years ago)
- Location:
- wp-postcode-lookup-form/trunk
- Files:
-
- 3 edited
-
options.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
wp-postcode-lookup-form.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-postcode-lookup-form/trunk/options.php
r1564766 r1564814 113 113 add_settings_section( 'main_section', 'Main Settings', 'wpplf23_section_cb', __FILE__ ); 114 114 add_settings_field( 'form_redirect', 'Postcode form redirect page:', 'wpplf23_form_redirect_setting', __FILE__, 'main_section' ); 115 add_settings_field( 'thankyou_page', 'Thankyou Page :', 'wpplf23_thankyou_page_setting', __FILE__, 'main_section' );115 add_settings_field( 'thankyou_page', 'Thankyou Page ID:', 'wpplf23_thankyou_page_setting', __FILE__, 'main_section' ); 116 116 add_settings_field( 'table_items_per_page', 'Table items per page:', 'wpplf23_table_items_per_page_setting', __FILE__, 'main_section' ); 117 117 add_settings_field( 'debug_log_enable', 'Enable debug log:', 'wpplf23_debug_log_enable_setting', __FILE__, 'main_section' ); … … 168 168 function wpplf23_thankyou_page_setting() { 169 169 $options = get_option( 'wpplf23_plugin_options' ); 170 ?> 171 <input name='wpplf23_plugin_options[thankyou_page]' type='number' value='<?php if ( ( isset( $options['thankyou_page'] ) ) ) { echo $options['thankyou_page']; } ?>' /> 172 <?php 173 174 175 /* 170 176 $settings = array( 171 177 'textarea_name' => 'wpplf23_plugin_options[thankyou_page]', … … 187 193 wp_editor( $content, 'edit_thankyou_page', $settings ); 188 194 } 195 */ 189 196 } 190 197 -
wp-postcode-lookup-form/trunk/readme.txt
r1564766 r1564814 5 5 Requires at least: 4.0 6 6 Tested up to: 4.7 7 Stable tag: 4.07 Stable tag: 0.5.8 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 31 31 1. Activate the plugin through the "Plugins" menu in WordPress 32 32 1. Add this shortcode To the page you want to show the form on: [postcode_lookup_form_sc] 33 1. Create a page to hold the main form contents and place the same shortcode in it. 34 1. Sign up to Google maps API and reCAPTCHA to get your access keys. 35 1. Go to the options (Postcode Lookup Form in admin menu). In the option called "Postcode form redirect page" type the URL or page name of a page you have 36 created for the main form (E.g. "/my-lead-gen-form/"). 37 1. Now configure your options for notification emails, reCAPTCHA, Google Maps API key etc. 38 1. You can manage your submissions from the same admin menu. 33 1. Create a page to hold the main form contents and place the same shortcode in it 34 1. Sign up to Google maps API and reCAPTCHA to get your access keys 35 1. Create a thankyou page and note down the 'page id'. The post content from this page will be displayed on the same page after successful submission, 36 it will not redirected. 37 1. Go to the options (Postcode Lookup Form in admin menu). In the option called "Postcode form redirect page" type the URL or page name of a page you have 38 created for the main form (E.g. "/my-lead-gen-form/") 39 1. In the 'Thankyou Page ID' field put the page ID you noted earlier. 40 1. Now configure your options for notification emails, reCAPTCHA, Google Maps API key etc 41 1. You can manage your submissions from the same admin menu 39 42 40 43 == Frequently asked questions == … … 55 58 == Changelog == 56 59 60 = 0.5.8 = 61 * Changed how the thankyou page works. You now have to create a page manually and enter it's post id in the options 62 57 63 = 0.5.7 = 58 64 * Added UK telephone number validation capabilty -
wp-postcode-lookup-form/trunk/wp-postcode-lookup-form.php
r1564766 r1564814 2 2 /** 3 3 * Plugin Name: WP Postcode Lookup Form 4 * Plugin URI: http://rkbcomputing.co.uk/portfolio-items/wordpress-uk-postcode-lead-generation-plugin5 * Description: This is a multi-page contact form with postcode validation and address auto-completion.6 * Version: 0.5. 74 * Plugin URI: https://wordpress.org/plugins/wp-postcode-lookup-form/ 5 * Description: WP Postcode Lookup Form plugin was designed to help you easily add lead generation functionality to your Wordpress websites with UK address auto-complete. 6 * Version: 0.5.8 7 7 * Author: RKB Computing 8 8 * Author URI: http://rkbcomputing.co.uk … … 82 82 $options = get_option( 'wpplf23_plugin_options' ); 83 83 $form_redirect_option = $options['form_redirect']; 84 84 $thankyou_page_option = $options['thankyou_page']; 85 85 86 if ( ( isset( $options['recaptcha_enable'] ) ) ) { 86 87 $recaptcha_enable_option = $options['recaptcha_enable']; … … 356 357 357 358 if ( isset( $options['thankyou_page'] ) && $options['thankyou_page'] != '' ) { 358 $output = $options['thankyou_page']; 359 return $output ; 359 360 $my_postid = $thankyou_page_option;//This is page id or post id 361 $content_post = get_post($my_postid); 362 $content = $content_post->post_content; 363 $content = apply_filters('the_content', $content); 364 $content = str_replace(']]>', ']]>', $content); 365 366 return $content; 367 368 //$output = $options['thankyou_page']; 369 //return $output ; 360 370 } else { 371 header("Refresh:0; url=$thankyou_page_option"); 361 372 $output = ' 362 373 <h2>Thank you for your enquirey</h2> … … 366 377 <p>One of our representatives will be in contact with you soon, to deal with your request</p> 367 378 '; 368 return $output ;379 //return $output ; 369 380 } 370 381 }//End Page 3 of Form
Note: See TracChangeset
for help on using the changeset viewer.