The Third Bear

Just Right.

Posts about actionkit

Development workflow for ActionKit templatesets — by egj in actionkit , actionkit templates

I've been trying to find a good development workflow for editing ActionKit templatesets for a very long time now.

For a while, I got used to just coding my changes directly in ActionKit's web interface.  Obviously this is not an ideal editing environment, but the ease of previewing draft changes live…

Customizing ActionKit events: adding "duration" and end times — by egj in actionkit , events , actionkit data manager

By default, ActionKit events have a start time that's specified by their hosts, but they don't have any concept of an end time or a duration.  Knowing how long an event will last can be important for both organizing reasons -- staff want to know how big a commitment the hosts are making; potential a…

Actionkit forms with file upload fields — by egj in actionkit

You may sometimes need to associate uploaded files with Actionkit form submissions.  Broadly speaking, this can be done in two ways:

  1. Let users submit an Actionkit form, then land on a custom page hosted outside of Actionkit where they can upload a file to a server endpoint you've set up.  Capture the…

Complex template logic with {% record %} and {% with %} — by egj in actionkit

ActionKit's {% record %} tag can be used to build pretty complex logic directly in your page & email code.

Here's a basic example of the pattern:

Conditional "followup" questions in ActionKit surveys — by egj in actionkit

In an ActionKit survey, you may want to create "followup" questions that only appear if the previous question was answered a certain way.  For example, a "What is your favorite color?" question with radio choices for "red", "blue", "green", and "other": if a user chooses "other", then a text field s…

Custom public API endpoints for ActionKit data — by egj in actionkit

(12/20/2018) UPDATE: ActionKit now lets you enable CORS for specific hostnames.  This can be used to eliminate the JSONP wrapper described below, if you know in advance what websites should be allowed to access your API.

You can use heavily customized ActionKit templatesets to define your own JSON+JS…

Passing lists into ActionKit query reports — by egj in actionkit , actionkit reports

Suppose you want to build an ActionKit report where the end user inputs a list.  In some of these cases ActionKit is magical enough to know what you want to do and make it work without any effort, e.g. when you're querying for user_ids or mailing_ids.  But suppose we want a simple report to pull dat…

A/B testing ActionKit survey questions — by egj in actionkit

ActionKit's built-in A/B testing platform for pages is great, but it doesn't yet support variations in survey question labels or survey questions themselves.  Fortunately there's a pretty easy way to do it yourself, while still running through the A/B platform to stop and start variations, view test…

Aggregating values server-side in ActionKit templates — by egj in actionkit

I recently needed to add up some values in an ActionKit template, in order to display a tally of the fifty latest on a page, e.g.: "Members have pledged $5,678 recently -- can you pledge $10?"  There were a few constraints that made this nontrivial:

  • These were pledges, not donations, and hence were s…

Reusable code snippets in ActionKit templates — by egj in actionkit

(5/12/2016) UPDATE: We Also Walk Dogs just released a built-in "Make Your Own Templates" feature which makes this a lot cleaner.  Instead of overriding `wrapper.html` with a giant switch-case, you can now just create a new template for each custom snippet and include that template directly.

It's stil…

Hosting quizzes in ActionKit — by egj in actionkit

It's possible to use ActionKit survey pages to host quizzes, "what type of [X] are you" games, and even web polls that display the current winning responses.