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

Need hidden form field #76

Open
ebdavison opened this issue Feb 11, 2020 · 3 comments
Open

Need hidden form field #76

ebdavison opened this issue Feb 11, 2020 · 3 comments
Labels
enhancement This is a feature not a bug hacktoberfest

Comments

@ebdavison
Copy link

ebdavison commented Feb 11, 2020

I need a way to include a hidden form field that has a fixed value. For instance, the ID of the survey that is needed to tie it to an external table. Or a date that is is valid (like a January survey that has a 2020-01-01).

In my case, I need to collect stats every week and this form would help with that but it needs a week date to accompany it. I would be creating the same survey over and over for each week and would like to include the week date with the newly created form.

@Pierre-Sassoulas Pierre-Sassoulas added the enhancement This is a feature not a bug label Feb 12, 2020
@Pierre-Sassoulas
Copy link
Owner

Would it be possible to add the week in the name of the survey? Something like "Weekly survey (2020-47)". In any case, we can add information in the Survey object without having to also put it in the form, it can be linked from the primary key alone (that the server knows off). #75 aim is to add a begin and end date. Could you use that once we merge it to master?

@ebdavison
Copy link
Author

ebdavison commented Feb 16, 2020

Just putting the date in the title does not help as much since I would need to regex parse the title rather than just use an answer that is an actual date field.

Yes, I think I could use #75 where the date I am looking for can be the expiration date, I suppose. I would need to play with it.

But, the idea of hidden form fields is still something that is not necessarily related to dates. So, though #75 might solve me specific use case right now, there are other use cases that I can think of, like a customer ID, that might need to be stored with the survey that is not solved by a expiration date.

Seems like a question with a "is visible" check box and a way to put in a default value would not be too tough. I might take a crack at this myself.

@Pierre-Sassoulas
Copy link
Owner

The answers are linked to a Django User if authentication is implemented. But there probably is a use case for a hidden field, so I would welcome a pull request of course :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a feature not a bug hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants