Giter VIP home page Giter VIP logo

cakefoo's Introduction

Wufoo

What Am I?

I am CakeFoo, a CakePHP Plugin (Helper and DataSource) for the most awesome online form building tool known as Wufoo.

Oh yeah and I require CakePHP 1.3+ and PHP5+.

Let's Get Going!

  1. Sign up for a Wufoo account, remember your username.
  2. Extract the contents of this repo into app/plugins/wufoo/ or use git clone from your plugins folder:
git clone git://github.com/shama/Cake-Wufoo-Plugin.git wufoo
  1. Copy the following lines into app/config/database.php and add your username and api_key:
var $wufoo = array(
	'datasource' => 'wufoo.wufoo',
	'username' => 'USERNAME-HERE',
	'api_key' => 'API-KEY-HERE',
);

Can't find your API key? Login to wufoo.com, create a form, click on 'Code' then 'API Information'.

Wufoo Helper (Easily Embed Forms)

var $helpers = array('Wufoo.Wufoo');

Embed Form

Embed a Wufoo form directly into your view:

echo $this->Wufoo->embed('form-name-here');

Embed Form (IFrame)

Or if you prefer to use an iframe:

echo $this->Wufoo->iframe('form-name-here');

Wufoo DataSource (Access the Wufoo API)

If you have setup wufoo in your config/database.php then simply add this to your controller:

var $uses = array('Wufoo.Wufoo');

Otherwise you can directly use the DataSource anywhere in your code:

$Wufoo = ClassRegistry::init('WufooSource');
$Wufoo->init(array(
	'username' => 'USERNAME-HERE',
	'api_key' => 'API-KEY-HERE',
));

Forms

Get all forms:

$forms = $this->Wufoo->findForms();

Get specific form:

$form = $this->Wufoo->findForm('form-name-here');

Fields

Get all fields in a form:

$fields = $this->Wufoo->findFields('form-name-here');

Entries

Find all entries:

$entries = $this->Wufoo->findEntries('form-name-here');

Filtering your entries:

$entries = $this->Wufoo->findEntries('form-name-here', array(
	'conditions' => array(
		'Field1' => 'Kyle',
		'Field2' => array('Begins_with' => 'Y', 'Ends_with' => 'g'),
	),
	'order' => 'Field1 DESC',
	'limit' => 25,
	'page' => 0
));

Or if you prefer to use short hand:

$entries = $this->Wufoo->findEntries('form-name-here', 'Filter1=EntryId+Is_after+1&Filter2=EntryId+Is_before+200&match=AND');

Read more about filtering here.

Saving entries:

$this->Wufoo->saveEntry('form-name-here', array(
	'Field1' => 'Kyle',
	'Field2' => 'Young',
));

Users

$users = $this->Wufoo->findUsers();

Reports

Get all reports:

$reports = $this->Wufoo->findReports();

Get specific report:

$report = $this->Wufoo->findReports('report-name-here');

Widgets

$widgets = $this->Wufoo->findWidgets('report-name-here');

Comments

$comments = $this->Wufoo->findComments('form-name-here');

WebHooks

Adding a web hook:

$this->Wufoo->saveWebHook('form-name-here', array(
	'url' => 'your-webhook-url-here'
));

Deleting a web hook:

$this->Wufoo->deleteWebHook('form-name-here', 'webhook-hash-here');

Read more about web hooks here.

Login

$login = $this->Wufoo->login(array(
	'integrationKey' => 'INTEGRATION-KEY-HERE',
	'email' => 'USER-EMAIL-HERE',
	'password' => 'USER-PASSWORD-HERE',
	'subdomain' => 'USER-SUBDOMAIN-HERE', 
));

This function is for logging in other Wufoo users. You must have an integration key to retrieve an API key and access another Wufoo user. Read more about the login API here.

License

The MIT License (http://www.opensource.org/licenses/mit-license.php) Redistributions of files must retain the above copyright notice.

Author

Kyle Robinson Young, kyletyoung.com

cakefoo's People

Contributors

shama avatar

Stargazers

Daniel Pakuschewski avatar Craig Morris avatar

Watchers

James Cloos avatar  avatar

Forkers

morrislaptop

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.