Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ellipsis] Prevent responses in form fill page #70

Closed
wants to merge 1 commit into from

Conversation

ellipsis-dev[bot]
Copy link

@ellipsis-dev ellipsis-dev bot commented Jan 21, 2024

Summary:

Issue: #68
Plan feedback: Approved by @hbrooks

Implementation:

  1. Add a check for form open status
    • In the CreateFormInner function in the /src/pages/forms/fill/[id].tsx file, add a check after the form is fetched from the database. If the form's is_open property is false, set a new state variable isFormOpen to false. This state variable will be used to conditionally render the form or a message indicating that the form is closed.
  2. Create a new component for closed forms
    • Create a new React component in the /src/components directory. This component will be displayed when a form is closed. It should contain a message that says 'This form is no longer accepting responses. If you believe this is an error, contact the form author.' and a button that redirects to 'https://talkform.ai/'.
  3. Render the new component conditionally
    • In the CreateFormInner function in the /src/pages/forms/fill/[id].tsx file, use the isFormOpen state variable to conditionally render the form or the new component for closed forms. If isFormOpen is false, render the new component. Otherwise, render the form as usual.

Report:

Step Result Details
1
Add a check for form open statusUnable to fetch the file '/src/pages/forms/fill/[id].tsx' from the repository.
2
Create a new component for closed formsCreated a new React component 'ClosedFormMessage' in the '/src/components' directory. This component will be displayed when a form is closed. It contains a message that says 'This form is no longer accepting responses. If you believe this is an error, contact the form author.' and a button that redirects to 'https://talkform.ai/'.
3
Render the new component conditionallyUnable to fetch the file '/src/pages/forms/fill/[id].tsx' from the repository.

Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #68. Then, add the ellipsis:create label to try again. For more information, check the documentation.

Generated with ❤️ by ellipsis.dev

@ellipsis-dev ellipsis-dev bot requested a review from hbrooks January 21, 2024 17:06
@hbrooks hbrooks closed this Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant