marekq / amplify-survey

Create an online survey website using AWS Amplify.
https://survey.marek.rocks/
MIT License
1 stars 2 forks source link

Accessing Submitted Form #1

Open yuvi100 opened 3 years ago

yuvi100 commented 3 years ago

Hi there,

Thank you for sharing your code!

I'm new to using AWS Amplify and learning Vue JS.

I've successfully managed to deploy the app, however, i'm encountering a problem where a user who has submitted their survey can't access their submitted results after signing out and signing back in. The access link exists in the users "My Profile" panel, but clicking it just takes you to the start of the survey with none of the results saved (populated).

I have deployed the app here, if you want to create an account and test it out for yourself: https://main.d1zzcir6moux6n.amplifyapp.com/

I'd love to also request a feature:

Any help would be appreciated!

marekq commented 3 years ago

Hey @yuvi100,

Thanks so much for your comment and trying the project out! I've been using it to learn Vue and Amplify myself and happy to explain more or help to get some features added. I still need to do a better job at the readme to make the "workflow" clearer, but here is what I had in mind for the project;

With that being said, the access from the admin panel to surveys is controlled by Cognito User Groups right now. I still need to work on better modification of user permissions or default roles, but you could add your Cognito User to the group manually now.

If your user is part of the "admin" group you can see everything, there is also a "demo" and "test" group that I hard coded for testing purposes. It's definitely an area of improvement still and curious to hear your feedback here too.

Attached is a screenshot with how the Cognito User group permissions can be set and the view I see in the admin panel with the roles added.

Screenshot 2021-01-29 at 20 17 41 Screenshot 2021-01-29 at 20 17 09

Looking forward to your comments and thoughts!

marekq commented 3 years ago

By the way, there are a few other things I'm curious to get your input on;

yuvi100 commented 3 years ago

Hi Marek,

Thanks for taking the time to write such an in-depth response 🙂

My user-case is slightly different but I found some similarities in your project as well that I had wanted to implement.

I initially used the vue-form-flow repo to come up with an on-boarding experience for clients. Basically a questionnaire for clients to fill out before we get started on their project. The repo seemed a lot more interactive and engaging which is why I didn't opt for just a standard form.

In my use case there's currently only one form, but I would potentially have different forms for different services that the client might be interested in.

The problem I had was that the questions take some time to think about and answer, which is why I wanted to save the clients progress. Some answers can be a paragraph long and I don't want clients to lose their progress if their internet connection goes down, they accidentally close their browser tab etc... I also didn't want to rely on localStorage to save their progress and instead thought "why not have a login portal and save their responses to a database" which is how I came across your repo. Basically every time a user fills out an individual input field, the database updates and every time the user goes back to that field (after signing out or closing the tab) it pre-populates with the database response if it exists.

In my use case, the survey can only be filled out by an "approved user" (this is only because I want to save their progress) and the admin portal would only be used by me to review submitted answers to all surveys filled out by all users (and now that you've explained your user case - also be able to create more questionnaires). The user who filled in the form should also be able to review their submitted results only.

In regards to feature requests: Styling / logos etc. would be my last priority although I've already created my own theme for the vue-form-flow repo that I had cloned.

What I'm really interested in is saving form progress, and being able to have multiple questions on one "slide". I currently have 3 basic questions at the beginning of every form which ask for the clients "Name", "Business", "Phone Number" and I would like for it all to be on the same slide. Currently this is a three step process and these steps can add up, especially if I'm also expecting a client to fill out long answers in the questions that follow. This is by the way, also a feature request on the vue-flow-form repo already.

I think other features that might benefit other devs (including myself), is the ability for a user to export their responses to a PDF (this might be a little more complicated due to everyone having their own preference in styling the PDF). Additionally the ability to send the user a summary of their responses via email and for the admin to be notified that a response has been submitted.

I'd be happy to chat more about this and try to help out via Zoom etc. which might be easier 👍

marekq commented 3 years ago

Awesome, thanks for the thoughts! Maybe we should connect some time over Zoom and discuss. I'm in GMT+1, what timezone are you in?

I think we can change the survey for logged in customers only and see how we could load the previous submitted questions for them. Once someone is logged in, you can actually see and submit their login ID and use that for tracking responses per user. Instead of submitting the form with a random ID every time like is implemented now, we would update an (existing) record in DynamoDB.

We could also change the admin portal to view the customers responses only and let them modify responses as they wish later on. I can't think of any obvious show stoppers yet, but let me think on it a bit more. Also happy to connect sometime next week if we can make it work out time wise.

yuvi100 commented 3 years ago

That all sounds perfect to me - i'm in GMT+11, so a little difficult, but I don't mind staying up or getting up early to have a chat next week... I'll try do as much as possible before then. Shoot me a message a day before you want to have a chat and we can organise a time.