GithubHelp home page GithubHelp logo

gk-form-contact-saver's Introduction

=== Plugin Name ===

Plugin Name: GK Form Contact Saver Contributors: mcfarhat Donate link: Tags: wordpress, contacts, form, ajax Requires at least: 4.3 Tested up to: 4.9 Stable tag: trunk License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html

=== Short Summary ===

The Gk Form Contact Saver plugin provides the capability, through a custom post type called contacts, of saving front end form submissions via AJAX.

== Description ==

The plugin gives your wordpress install the capability to store front end form data that you either created manually, or via any plugin, via AJAX methodology instead of using POST or GET params, into a custom post type called "contacts", specifically stored under wordpress as the post type "gk_unload_contacts".

The front end form needs to adhere to the standard data available for use via the plugin. The data includes following fields: First Name, Middle Initial, Last Name, Email, Primary Phone, Mobile Phone, Street Address, City, State, Zip, DOB, Language, and Referrer. You do not to make use of all fields, only a subset of such fields.

Hooking your form into the plugin can be easily done. You would need to add in to you form's code a JS function that you would hook to a new submit button. Alternatively, you can also hook the function upon the page unload functionality, so that any user who visited your page and filled some of the data, will still end up submitting this information to you.

A sample hooking JS function would look as follows (this is hooking into the unload event of the page): jQuery( window ).on('beforeunload',function($) { jQuery.ajax({ crossOrigin: true, url: ajax_url,//needs to be intialized first type: "POST", async: false, data: { action : 'store_contact_form_unload', fname : jQuery('#GK_CUST_FIRSTNAME').val(), mname : jQuery('#GK_CUST_MI').val(), lname : jQuery('#GK_CUST_LASTNAME').val(), dob : jQuery('#GK_CUST_DOB').val(), stadd : jQuery('#GK_CM_ADDRESS2').val(), city : jQuery('#GK_CM_CITY').val(), state : jQuery('#GK_CM_STATE').val(), zip : jQuery('#GK_CM_ZIP').val(), lang : jQuery('#GK_CUST_BILL_TYPE').val(), pphone: jQuery('#GK_PHONE1').val(), mphone: jQuery('#GK_PHONE2').val(), email : jQuery('#GK_EMAIL_ADDRESS').val(), refer : jQuery('#GK_REFERRED_BY').val(), }, /success : function( response ) { console.log( "success response:"+response ); },/ }); //bring up confirmation to ensure we have enough time to send AJAX return; });

Once submissions are being saved using the plugin, they will actually show in the backend interface under the relevant "contacts" tab. For screenshots refer to the screenshots section below.

If you require a different set of fields to be supported, need custom work done, or have an idea for a plugin you're ready to fund, check our site at www.greateck.com or contact us at [email protected]

== Installation ==

  1. Upload the plugin files to the /wp-content/plugins/gk-form-contact-saver/ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Go to a page or create a new page
  4. Insert the plugin code into the text editor [collatz_simulator] and save/publish
  5. That's it! Now you can visit that page from front end, and play around with the simulator

== Screenshots ==

  1. Screenshot of the left tab menu where contacts are accessible https://www.dropbox.com/s/ruzr7ojm555ph4v/contacts_left_menu.png?dl=0
  2. Screenshot of the headers/data within the contacts screen https://www.dropbox.com/s/1z4y5401apngidp/header_screen_contacts_submission.png?dl=0

= 0.1.0 =

  • Initial Version *

gk-form-contact-saver's People

Contributors

mcfarhat avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.