Developing a feedback form (response only card)

There are scenarios where you just want to fill up a form without having to request for a response. In those scenarios, you could use the response only card / form type of card. (Scenario #3 in the post Exploring Kaizala card view scenarios).

As a pre-read, I recommend reading the earlier post on Developing a custom feedback card which covers a bunch of details on understanding the survey model, Kaizala SDK, card views, etc. This post would be based on the same example but just narrowing to get the response (without the requesting for response / feedback part).

Developing the feedback form

We will use the same scenario from the earlier post – Get feedback from user. The only 2 flows that will be involved in the form are:

  1. Response flow – where user enters his feedback
  2. Summary flow – where user views the feedback submitted

A form type of action will need to be pinned to the palette for members / subscribers – enabling to respond on demand. Hence the group will need to have a managed palette for members / subscribers.

Since the view that is launched by tapping on the icon in the palette is the creation view, we would be getting the response in the creation view. Below is the screenshot of how the package.json looks.

package.json

Form type of actions are aggregated at a group level (user does not request for a feedback). Which requires the actionScope to be set to Group. Also, note the sourceLocation for CreationView is ResponseView.html (not a requirement, but just kept it that way to remind that we would be capturing the response in the creation view).

Creation View

In the creation view, we would be capturing the response from the user. Note the parameters in sumbitFormResponse for:

  • responseId is null as previous response is not being edited
  • showInChatCanvas is set to true – without which a card after the user adds a response would not appear 

response

Response Results View

In the summary view / ResponseResultsView, we would be querying for the user’s response (which would be that particular response corresponding to the entry / card).

summary view

Closing remarks

Thank you for reading. Hope the post was helpful, let me know through the Contact page. The code for this package has been shared here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s