-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ability to share responses / results #455
Comments
Seems a bit hard and lots of work no? |
Let’s say 2.2 for now – it would be quite useful, and it’s better to properly assess it before. It was also said that making the summary stats page is hard. ;) |
It would be very nice, to add the optional ability to show the user after sending the form, the summary of the responses. Also very helpful could be, to share a link to the responses of a form for non nextcloud users. |
or, if this proves hard; to share a form with a co-worker. |
Let me also add opposite requirement: to limit sharing responses with limited number of people. |
We are using forms for signups for a Minecraft server, and it works great. It would be ideal to be able to share the responses with the rest of the MC server admins without my intervention each time there is a response. |
Hi, This feature has been asked during UX tests on my end, involving a situation where:
This situation sounds similar to @pebkacs's as described in the comment above. A sharing link for the responses view should answer those needs. Another solution would be to share the whole form (including the "questions" view) in read-only mode. |
Maybe a workaround to make it easier for a first step: create a link to download the latest version of the CSV. As a first step, this link can be public, and as a second step we could decide if it's limited to Nextcloud users or for a Nextcloud group. |
That is how I am working around the issue currently. However, the main issue is that now the data has to be synced or downloaded to each admin's personal machine where I cannot enforce security of that info. I also have to manually convert each file to an encrypted spreadsheet which breaks the ONLYOFFICE app compatibility. All that to say, if you do plan to do similar, make sure you take extra security measures to protect your data in the event one of your users with access to that data don't have the best security practices, or have their device stolen. |
Can you explain how you get this Public Link now? For the moment I´m only see the option to manually export the CSV to Files and share them. But I need an automatic export oder anonymous download link. |
Would be great to see this feature of being able to share form results live, without needing to export to CSV. |
if that can be of some use to anyone as a workaround, I currently use the following small python app to query the app API and dynamically serve the csv file to share the results. #!/usr/bin/env python3
from quart import Quart, Response
import hypercorn
from hypercorn.asyncio import serve
import yaml
import bs4
import aiohttp
import signal
import asyncio
##### Configuration #####
app = Quart(__name__)
parameters = None
with open('parameters.yaml', 'r') as f:
parameters = yaml.load(f, Loader = yaml.FullLoader)
hypercorn_config = hypercorn.config.Config()
hypercorn_config.bind = parameters['bind_address']
##### Asyncio loop management #####
loop = asyncio.get_event_loop()
### shutdown management ###
shutdown_triggered = asyncio.Event()
loop.add_signal_handler(signal.SIGTERM, lambda : shutdown_triggered.set())
loop.add_signal_handler(signal.SIGINT, lambda : shutdown_triggered.set())
##### HTTP querying #####
### globals ###
session = None
session_available = asyncio.Event()
session_task = None
### management ###
#manage a global session object for querying http api
async def setup_session():
global session
global session_available
async with aiohttp.ClientSession(cookie_jar=aiohttp.CookieJar(unsafe=True)) as s:
session = s
session_available.set()
await shutdown_triggered.wait()
##### Credentials #####
credentials = None
with open('credentials.yaml', 'r') as f:
credentials = yaml.load(f, Loader = yaml.FullLoader)
#### Queries ####
async def get_requesttoken():
await session_available.wait()
url = f"http://{parameters['nextcloud_address']}/apps/forms"
r = await session.get(url, auth=aiohttp.BasicAuth(credentials['user'], credentials['password']))
r.raise_for_status()
html_answer = await r.text()
token = bs4.BeautifulSoup(html_answer, 'html.parser').head['data-requesttoken']
return token
async def get_submissions(form_id):
token = await get_requesttoken()
url = f"http://{parameters['nextcloud_address']}/ocs/v2.php/apps/forms/api/v1/submissions/export/{form_id}"
headers = {
'OCS-APIRequest': 'true',
'requesttoken': token
}
r = await session.get(url, auth=aiohttp.BasicAuth(credentials['user'], credentials['password']), headers = headers)
r.raise_for_status()
answer = await r.text()
return answer
##### Web app #####
#setup concurrent tasks
@app.before_serving
async def startup():
global session_task
session_task = loop.create_task(setup_session())
#ensure that concurrent tasks are gracefully shut down
@app.after_serving
async def shutdown():
asyncio.gather(session_task)
forms = None
with open('forms.yaml', 'r') as f:
forms = yaml.load(f, Loader = yaml.FullLoader)
#serve the web page
@app.route(f"/<form>.csv")
async def form_submissions(form):
csv = await get_submissions(forms[form])
response = Response(csv, mimetype='text/csv')
return response
loop.run_until_complete(serve(app, hypercorn_config, shutdown_trigger = shutdown_triggered.wait)) This goes with three configuration files, you can gather everything in a single one, but this was easier for me. The file user: <your nextcloud user here>
password: <your generated app password here> the parameters to define the nextcloud url and the bind address of the resulting app in bind_address: <host:port, for instance : localhost:8000>
nextcloud_address: <your nextcloud url> and finally the list of forms to serve is like some_name: <form id>
some_other_name: <some other form id>
... the csv will then be available by querying |
@nivoliev Thanks a lot for sharing! |
A possible solution could also be to transfer ownership of a form to a group (if something like that is even conceptually possible in Nextcloud). Then every group member could edit the form as well as view the results. |
So sorry I did not see your reply sooner. I was exporting the CSV to another folder, and then sharing the link to the CSV file, not the form results directly since that is not an option currently. |
I may be missing something as I am quite new to this, but as the infrastructure for live editing a file is already there in Collabora, couldn't a live .csv document just be populated by the forms app? Then you just need to adjust the ownership of the file? To be honest, the results page with sortable columns for us would be satisfactory as long as multiple users can have access to it. I run a small nursery and we would like parents and staff to input a daily health check using a form and have the results accessible by admin staff. We then have to report it to the city and the CSV file export serves us well there. |
Adding some feedback from the user testings here. Collaboration was the most required feature from all sessions. That includes the ability to collaborate on form creation and the ability to share form responses. Related to this, we encountered a usability issue while testing the Form Results screen. Participants were convinced that clicking on the "Share Link" button(screenshot below) would provide the link to the form results. Currently, that button copies the link for questions. Only a few participants were able to understand its functionality, and that was only after I followed up with questions about it. The way they tested this was by copying the link and pasting it in a different browser. |
I was under the same impression, and was actually surprised to find this issue still open, since I was quite sure I had seen a button to share the results in the app just now. In fact, it seems that the button has moved since the above screenshot was made, and is now even more likely to be interpreted as a "share results" link: Regardless, one way to implement this feature request that has not been mentioned yet, would be to implement saving results to a spreadsheet (#5) and then just use the existing readonly sharing link for spreadsheets with the results sheet. It might not be perfect in all cases, so also implementing a dedicated results share link might be useful in any case, of course. |
This would be really useful for compiling lists and avoiding duplicates and inform everyone about what's on the list |
This app would be really useful as a simple anonymous feedback form for flat, decentralized organizations! But without the multi-user view-results feature it cannot be used for that. |
I would be super happy to benefit from this feature. Has anybody found a workaround? To dispatch a result event to a shared spreadsheet, or CSV file or anything? |
We would like to have the feature as well in our club: We want to share a link with the option to register for stuff to bring along for events (cake, finger food, ...). To avoid having 30x of the same food, it would be required that the users see the previous results. I would be willing to have a look at the source code and see if I can make some way of public sharing via link happen. However, I would rather not do that against the better wishes of the maintainers. Doing the work and not getting the PR accepted seems not a good investment of time 😉. |
There is already some progress going on where the results should automatically be written to a linked csv file. So I don't think that the "download csv" link should be made public for now. |
I am not talking about making the CSV publicly available. I am talking about a page similar to the result page where one has a view of all results so far inserted into the app. |
Sure, but as soon as the csv file will be updated automatically, you can easily share the results that way until the new sharing/permissions in version 3 will be extended to provide a more collaborative Forms app |
Yes, as I said, a CSV is definitively no solution to my problem. I will have to wait for the updated version 3. Is there anything yet on the roadmap with a time schedule? |
It would be great if not only the form creator could see the responses, but they could also be shareable via link, or to a group of other Nextcloud accounts.
(Splitting this off from the "Collaborative editing" #322 )
The text was updated successfully, but these errors were encountered: