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:
- Response flow – where user enters his feedback
- 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.
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).
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 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).