Using helpful.io

We want to help our users and provide them with an easy way to give feedback on what we do.

Helpful.io is awesome for that because it's easy to implement and very scalable. We've set up an account so our whole team will get an email when a user submits a helpful message.

To implement it in our app we used our standard modal for writing the message. The email of the user that is logged in is already embedded in the form.

As you can see we use ember validations to validate that there is a message and block the user from submitting the form until the message is written.

Helpful needs a URL and your Helpful.io account name. We don't want that in the code so we put it in our .ENV file and load it as a global variable in the JS like this:

LS.ENV = {
  "helpfulUrl": '<%= ENV["HELPFUL_URL"] %>',
  "helpfulAccount": '<%= ENV["HELPFUL_ACCOUNT"] %>'
}

In the controller we submit the form with jQuery so we can close the modal after submitting, also there is one more check to see if the model is valid.

LS.HelpfulController = Ember.ObjectController.extend(
Ember.Validations.Mixin,
LS.CurrentUserMixin, {
  actions: {
    submit: function () {
      if(this.get('isValid')) {
        $("#helpful-form").submit();
        this.send('closeModal');
      }
    },

    cancel: function () {
      return this.send('closeModal');
    }
  },
  validations: {
    content: {
      presence: true
    }
  }
});

As you can see it's very easy to implement helpful. So go on and try out the app and if you need help go to the menu and click on Help Me.

Have fun!