Assignment Response Form

Hi Everyone,

I am trying to implement an assignment/response feature where an admin User can essentially assign a list of questions to multiple non-admin Users.

My database is setup such that Assignments have many Questions and also many Users. A Question has a single “question body” and many Question Responses. Each Question Response contains a single text “response body”, and each Question Response is also attached to a single User. (Representing that specific User’s response to that specific Question in that Assignment).

I have already successfully been able to store an Assignment that contains multiple Questions and multiple Users assigned to it. I also have made a screen where the Users who were given an assignment to respond to the questions. However, when they respond to a question (by just typing in an input box) I haven’t been able to prevent the User from submitting multiple Question Responses for a single question - since the submit button creates a new Question Response every time you click it. Ideally, the User should only be able to submit one answer for each question. I also have tried somehow making the submit button (that creates a new response) conditionally visible only when the User has not yet submitted an answer for that question. (and another button that is only conditionally visible when the User has already submitted a response to that question and instead allows the User to edit their previous response)

Please let me know if you have any ideas on how I can prevent Users from submitting more than one response. The important distinction here is that I want a Question to have many Question Responses, but only one Question Response per User assigned to it.

Here is a photo of the response form (note: the Orange “Submit Responses” button doesn’t actually do anything right now, only the White button on each question actually stores the input value in a new Question Response)

Thanks!

This question has been resolved, thank you @dilon_perera !

1 Like