{"id":16798995,"url":"https://github.com/sjelfull/airtable","last_synced_at":"2025-06-29T06:06:33.644Z","repository":{"id":84047274,"uuid":"89713132","full_name":"sjelfull/airtable","owner":"sjelfull","description":"Sweet saving and fetching of data with Airtable","archived":false,"fork":false,"pushed_at":"2017-04-29T13:10:11.000Z","size":151,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T00:29:41.984Z","etag":null,"topics":["craft-plugin","craftcms","craftcms-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjelfull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-28T14:20:20.000Z","updated_at":"2025-02-20T21:32:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"351a1f9d-f37e-42a4-b341-d00ab3825e9c","html_url":"https://github.com/sjelfull/airtable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sjelfull/airtable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fairtable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fairtable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fairtable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fairtable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjelfull","download_url":"https://codeload.github.com/sjelfull/airtable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fairtable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545030,"owners_count":23326658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craftcms","craftcms-plugin"],"created_at":"2024-10-13T09:27:31.415Z","updated_at":"2025-06-29T06:06:33.618Z","avatar_url":"https://github.com/sjelfull.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airtable plugin for Craft CMS\n\nSweet saving and fetching of data with [Airtable](https://airtable.com/invite/r/znUACjay)\n\n![Icon](resources/icon.png)\n\n## Installation\n\nTo install Airtable, follow these steps:\n\n1. Download \u0026 unzip the file and place the `airtable` directory into your `craft/plugins` directory\n2. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n3. The plugin folder should be named `airtable` for Craft to see it.\n\nAirtable works on Craft 2.4.x and Craft 2.5.x.\n\n## Airtable Overview\n\n[Airtable](https://airtable.com/invite/r/znUACjay) is a human-friendly database solution that makes it super easy to manage both simple and complex, relational data.\n\n## Configuring Airtable\n\n```php\n\u003c?php\nreturn [\n    // Find this on https://airtable.com/account\n    'apiKey'        =\u003e '',\n\n    // Find this on https://airtable.com/api\n    'base'\n                    =\u003e '',\n    // The name of the table. Make sure the capitalization is correct\n    'table'         =\u003e '',\n\n    // Allowed field keys. This matches the field names in the table\n    'allowedFields' =\u003e [ ],\n];\n```\n\n## Using Airtable\n\n_Example form_\n\n```twig\n\u003cform method=\"post\" accept-charset=\"UTF-8\"\u003e\n    {{ getCsrfInput() }}\n    \u003cinput type=\"hidden\" name=\"action\" value=\"airtable/save\"\u003e\n    \u003cinput type=\"hidden\" name=\"redirect\" value=\"airtable?success={Name}\"\u003e\n    \u003cinput type=\"hidden\" name=\"enabled\" value=\"1\"\u003e\n\n    {% macro errorList(errors) %}\n        {% if errors %}\n            \u003cul class=\"errors\"\u003e\n                {% for error in errors %}\n                    \u003cli\u003e{{ error }}\u003c/li\u003e\n                {% endfor %}\n            \u003c/ul\u003e\n        {% endif %}\n    {% endmacro %}\n\n    {% from _self import errorList %}\n\n    {# Display server error #}\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('server')) }}\n    {% endif %}\n\n    \u003clabel for=\"name\"\u003eName\u003c/label\u003e\n    \u003cinput id=\"name\" type=\"text\" name=\"Name\"\n            {%- if airtable is defined %} value=\"{{ airtable.Name }}\"{% endif -%}\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Name')) }}\n    {% endif %}\n\n    \u003clabel for=\"email\"\u003eE-mail\u003c/label\u003e\n    \u003cinput id=\"email\" type=\"text\" name=\"E-mail\"\n            {%- if airtable is defined %} value=\"{{ airtable['E-mail'] }}\"{% endif -%}\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('E-mail')) }}\n    {% endif %}\n\n    \u003clabel for=\"notes\"\u003eNotes\u003c/label\u003e\n    \u003ctextarea id=\"notes\" name=\"Notes\"\u003e\n        {%- if airtable is defined %}{{ airtable.Notes }}{% endif -%}\n    \u003c/textarea\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Notes')) }}\n    {% endif %}\n\n    \u003cfieldset\u003e\n        {% set options = ['First option', 'Second option'] %}\n        {% for option in options %}\n            \u003clabel\u003e\n                \u003cinput type=\"radio\" name=\"Single-select\" value=\"{{ option }}\"\n                        {%- if airtable is defined and airtable['Single-select'] == option %} checked{% endif -%}\u003e\n                {{ option }}\n            \u003c/label\u003e\n        {% endfor %}\n    \u003c/fieldset\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Single-sele{ct')) }}\n    {% endif %}\n\n    \u003cfieldset\u003e\n        {% set options = ['First option', 'Second option'] %}\n        {% for option in options %}\n            \u003clabel\u003e\n                \u003cinput type=\"checkbox\" name=\"Multi-select[]\" value=\"{{ option }}\"\n                        {%- if airtable is defined and option in airtable['Multi-select'] %} checked{% endif -%}\u003e\n                {{ option }}\n            \u003c/label\u003e\n        {% endfor %}\n    \u003c/fieldset\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Multi-select')) }}\n    {% endif %}\n\n    \u003cfieldset\u003e\n        \u003clabel for=\"date\"\u003eDate\u003c/label\u003e\n        \u003cinput id=\"date\" type=\"date\" name=\"Date\"\n                {%- if airtable is defined %} value=\"{{ airtable['Date'] }}\"{% endif -%}\u003e\n    \u003c/fieldset\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Date')) }}\n    {% endif %}\n\n    \u003clabel\u003e\n        \u003cinput type=\"checkbox\" name=\"Checkbox\" value=\"1\"\n                {%- if airtable is defined and airtable['Checkbox'] %} checked{% endif -%}\u003e\n        Accept terms\n    \u003c/label\u003e\n\n    {% if airtable is defined %}\n        {{ errorList(airtable.getErrors('Checkbox')) }}\n    {% endif %}\n\n    \u003cinput type=\"submit\" value=\"Save\"\u003e\n\u003c/form\u003e\n```\n\n_Find records in table_\n```twig\n{% set records = craft.airtable.findRecords() %}\n{% if records | length %}\n    \u003ctable\u003e\n        \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eName\u003c/th\u003e\n            \u003cth\u003eE-mail\u003c/th\u003e\n            \u003cth\u003eDate\u003c/th\u003e\n        \u003c/tr\u003e\n        \u003c/thead\u003e\n    {% for record in records %}\n        {% set fields = record.getFields() %}\n        \u003ctr\u003e\n            \u003ctd\u003e{{ fields['Name']|default('') }}\u003c/td\u003e\n            \u003ctd\u003e{{ fields['E-mail']|default('') }}\u003c/td\u003e\n            \u003ctd\u003e{{ fields['Date']|default('') }}\u003c/td\u003e\n        \u003c/tr\u003e\n    {% endfor %}\n    \u003c/table\u003e\n{% endif %}\n```\n\n_Find records in table with criteria_\n\n```twig\n{% set records = craft.airtable.findRecords({\n    'Name': 'Thomas'\n}) %}\n{% if records | length %}\n    \u003ctable\u003e\n        \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eName\u003c/th\u003e\n            \u003cth\u003eE-mail\u003c/th\u003e\n            \u003cth\u003eDate\u003c/th\u003e\n        \u003c/tr\u003e\n        \u003c/thead\u003e\n        {% for record in records %}\n            {% set fields = record.getFields() %}\n            \u003ctr\u003e\n                \u003ctd\u003e{{ fields['Name']|default('') }}\u003c/td\u003e\n                \u003ctd\u003e{{ fields['E-mail']|default('') }}\u003c/td\u003e\n                \u003ctd\u003e{{ fields['Date']|default('') }}\u003c/td\u003e\n            \u003c/tr\u003e\n        {% endfor %}\n    \u003c/table\u003e\n{% endif %}\n```\n\n## Airtable Roadmap\n\nSome things to do, and ideas for potential features:\n\n* Support multiple tables\n* Support attachments\n* Add logging\n\nBrought to you by [Superbig](https://superbig.co)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fairtable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjelfull%2Fairtable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fairtable/lists"}