Skip to content

joffff/WPForm-FLG360

 
 

Repository files navigation

== WPForm FLG360 [flg-form] Shortcode ==

Allows the user to create forms simply using a shortcode [flg-form], with all the common fields pre-built and ready for use
set as the fields attribute. There is also a form type attribute, which provides different fields on top of the default
field set.

The default field set is:

'title', 'first_name', 'last_name', 'email', 'telephone', 'submit'

So if you simply use the shortcode with no attributes it will create a form with those fields, and with title, first_name
last_name and email as required fields, and with html5 enabled and the html5shiv enqued also.

If you set form_type to 'subscribe' it adds a field for username and password, with password automatically having a confirm field as well, which is of course part of the in-built form validation. The user is added to WP as a subscriber and notifications are sent also.

If you set 'contact' as the form_type attribute, then instead of username and password the plugin adds a text field for company, and a subscribe to newsletter checkbox. If they hit subscribe then they are added to Wp as a subscriber, with the first part of their email as username (numbers are appended if the name exists, and continue to be changed until unique name is found).

The function that does all that field adding ends with a filter, as does the function that configures all the field settings such as type/required etc for easy addition of custom field types.

== Installation ==

1. Extract the zip and add the entire plugin directory to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Then simply use the shortcode with the following parameters:

            'api_url' => '',//the API url as flg360 uses username subdomains, may change this to FLG user and build url from that
            'site' => '', //the FLG360 site to add the lead under
            'leadgroup' => '' //the FLG360 leadgroup to add the lead under,
            'source' => '', //FLG360 source
            'medium' => '', //FLG360 source
            'form_type' => '', // as laid out above.
            'legend' => 'Please fill out form',
            'submit_label' => 'Submit'


About

A shortcode form builder connected with the FLG360 LeadCreateUpdate API so submissions are added as leads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.8%
  • Other 0.2%