Skip to content

Instantly share code, notes, and snippets.

@kellishouts
Last active May 4, 2017 21:50
Show Gist options
  • Save kellishouts/d774a99257969510b99c7d9b58fc45dd to your computer and use it in GitHub Desktop.
Save kellishouts/d774a99257969510b99c7d9b58fc45dd to your computer and use it in GitHub Desktop.
Airship CMS - Collection Public Make (Form)

Set up a Collection with Public Make

Collection Title: Contact
Collection Name: submission
Collection Public Path: contact
Layout: application.html
Template Directory: contact
Fields:

  • Name (text)
  • Email (text)
  • Message (textarea)
    Primary Label: Created At

Local Files

  • Locally, create the template directory contact in the templates directory. Add index.html inside contact. For the form, you don't need any other templates.
  • Add the example airmail.html layout to your layouts directory. Add the example contact_email.html template to your airmail directory. (If you ever change the directory public path, the name of this file is derrieved from the public make path with _email.html appended)
  • Make sure the contact.js script is in your scripts.

Edit contact.js

  • Edit the contact.js on line 68, so that NUMBER is replaced with the id of your collection. You can find the ID of your collection by going to the Modify view in the admin and looking in the URL. aerostat_collection_id:NUMBER,

Public Make Email

  • In the Admin, go to Settings and then the Email tab.
  • Add your email to the Public Make email list, so emails send to you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment