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

Request for tutorial: Entry form #225

Open
martindemello opened this issue Feb 19, 2023 · 1 comment
Open

Request for tutorial: Entry form #225

martindemello opened this issue Feb 19, 2023 · 1 comment

Comments

@martindemello
Copy link

I've been trying to reproduce the google sheets workflow where you have a page with an entry form, and on form submit data is entered into a new row in the table. Grist clearly has all the required machinery to do this, but I have been playing around with the card widget and have been unable to get the workflow working.

The bits I'm missing are

  • Loading the page with the form widget should always bring up a new, blank form
  • Users should only be able to fill in this form, and not edit past data
@dsagal
Copy link
Member

dsagal commented Feb 26, 2023

I recommend taking a look at https://github.com/gristlabs/grist-form-submit. It's a repo for connecting external forms to Grist, so a little different from what you have in mind, but may actually be a better fit.

Grist doesn't have built-in forms yet, which is what you are describing. You can get pretty close with access rules. E.g. you can set up a Card widget, with access rules that allow you only to create a new record. But there is a subtlety about your second point. In Grist, a Card view is essentially another way to see a spreadsheet row. It means there is no "Submit" button. Once you type in the first field, the record is created. For this reason, to allow the user to fill in more fields, you need rules that allow editing a record created by the current session (which is possible using the user.SessionID condition. But that makes it hard to disallow editing once a record is added. Basically the issue is that unlike proper forms, Grist "card view" does not have a "Submit" step.

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

No branches or pull requests

2 participants