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).
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).
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.
I have tried this sample and I only change id in package.json. After I fill the selection and input text ready I submit it and the card is pop in my chat group but why it only visible for me not for everyone. Did I miss anything? or any suggestion. Thank you.
LikeLike
Kaizala has 2 types of actions: (1) Form (2) Survey.
Form (aka response card) allows a user to fill a response (that other users need not be aware of). To give feedback / track response, the user gets a card on the chat (visible only to him). [Example: https://kaizala007.blog/2018/07/27/developing-a-feedback-form-response-only-card/%5D
The Survey (aka request response card) is the one where details are requested by the user and everyone in the group sees the card. Users can then open the card and submit responses. [Example: https://kaizala007.blog/2018/07/07/developing-a-custom-feedback-card/%5D
LikeLike