An open API service indexing awesome lists of open source software.

https://github.com/mdxprograms/craft-airtable

Airtable integration in craft cms
https://github.com/mdxprograms/craft-airtable

Last synced: 7 months ago
JSON representation

Airtable integration in craft cms

Awesome Lists containing this project

README

          

# Airtable plugin for Craft CMS

Use Airtable bases in Craft

![Screenshot](http://www.chromegeek.com/wp-content/uploads/2016/02/Airtable-official-logo.png)

## Installation

To install Airtable, follow these steps:

1. `cd /craft/plugins && git clone https://github.com/mdxprograms/craft-airtable.git airtable`

Airtable works on Craft 2.4.x and Craft 2.5.x.

## Airtable Overview

This plugin adds the ability to integrate your airtable bases and tables into
craft cms.

## Configuring Airtable

To add your settings, go to settings->plugins->airtable in craft admin panel.

1. You will need to supply your api key
2. Bases and Tables input takes the base id and then the table name.

Ex: `appSdasdfindin@Products`

You may add more by separating your entries with a `,`

Ex: `appSdasdfindin@Products,appSdasdfindin@Categories`

## Using Airtable

Once your settings are saved you will have access to a full crud api and some
template variables as well.

### Twig template variables
Find All records in a table:
`craft.airtable.all('your_table_name')`

Find a single record within a table:
`craft.airtable.find('your_table_name', 'your_record_id')`

List tables:
`craft.airtable.tables()`

Get a specific base by associated table:
`craft.airtable.getBase('your_table_name')`

### API CRUD and form submissions
Find All records (table name is required as a parameter):
`GET: airtable/records/all`

Find a single record within a table (table name and record id are required parameters):
`GET: airtable/records/find`

Save a record using a custom form:
NOTE: you will need to supply a hidden field with the `name="table"` with your
table name as the value.
All form elements that you would like to post to will need to be added with
`name="fields[your_field_name]"`

You can also use the update action using the same form setup by just replacing
the hidden action field value to: `airtable/records/update` and add a hidden field
`name="recordId"` with the current record's id as the value.

Example form save below:
```







```

Delete record (`recordId` must be supplied via post data):
`POST: airtable/records/delete`

## Airtable Roadmap

Some things to do, and ideas for potential features:

* Generate forms based on table fields with a twig template generated

## Airtable Changelog

### 1.0.0 -- 2016.12.5

* Initial release

Brought to you by [Josh Waller](https://www.joshwaller.me)