2017 © Pedro Peláez
 

library wufoo-html-wrapper

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

image

owenr88/wufoo-html-wrapper

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

  • Tuesday, January 26, 2016
  • by owenr88
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Wufoo HTML Wrapper

The Wufoo HTML wrapper is a PHP class that outputs Wufoo fields using their API. There is also a built in Bootstrap option to use those classes and styles., (*1)

The class returns errors on incorrect submissions, shows required fields and even the instruction text. It also supports multiple forms on one page., (*2)

You can view a list of fields supported by the class below. This is still a work in progress, so pull requests are massively loved (make sure to use the dev branch!), (*3)

Having trouble? Get me on Twitter @OwenTheTwit., (*4)

Installation

Either install this using composer or download and include the file in your project., (*5)

Don't forget to also create an account on Wufoo., (*6)

Composer

composer require owenr88/wufoo-html-wrapper, (*7)

Manually

include_once 'WufooHTMLWrapper.php';, (*8)

Using the class

There are a few things required before using the class:, (*9)

  1. Get your API Key
  2. Get your account subdomain - i.e. https://biglemon.wufoo.com

The example.php file in the project root is a great place to start and covers all required functions and options., (*10)

Initialization

Initialize the class on your page to start off the wrapper, (*11)

$wrapper = new WufooHTMLWrapper();, (*12)

Enable Bootstrap

$wrapper->enableBootstrap();, (*13)

Build a form

This function accepts a form ID or the form url slug. The ID can be found by clicking 'Share Form' in Wufoo and taking the ID from the URL (i.e. 'z172ip8e07gen9n'), or the slug can be taken directly from the URL (i.e. 'test-form')., (*14)

This function RETURNS the HTML. Make sure to echo it to the page., (*15)

$wrapper->buildForm( 'z172ip8e07gen9n' );, (*16)

or, (*17)

$wrapper->buildForm( 'test-form' );, (*18)

Submit form data

$wrapper->sendSubmission();, (*19)

Current Fields Supported

Standard

  • Single Line Text
  • Paragraph Text
  • Multiple Choice
  • Number
  • Checkboxes
  • Dropdown

Fancy Pants

  • Email

Other formats MIGHT be supported, but they just use their type (i.e. number, email, etc) as the input field's type attribute, (*20)

Changelog

1.0.5

  • Removed default API key and subdomain in the class

1.0.4

  • Composer formatting

1.0.3

  • Updated readme... urgh

1.0.2

  • Updated composer file

1.0.1

  • Updated readme

1.0.0

  • The very first version! Includes the class, an example and all reqired documentation.

The Versions

26/01 2016

dev-master

9999999-dev

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

  Sources   Download

The Requires

  • php >=5.3.0

 

php html wufoo

26/01 2016

dev-dev

dev-dev

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

  Sources   Download

The Requires

  • php >=5.3.0

 

php html wufoo

26/01 2016

v1.0.5

1.0.5.0

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

  Sources   Download

The Requires

  • php >=5.3.0

 

php html wufoo

25/01 2016

v1.0.4

1.0.4.0

Output Wufoo form HTML using the Wufoo API. Also manages answer validation and submissions.

  Sources   Download

The Requires

  • php >=5.3.0

 

php html wufoo