forms
forms copied to clipboard
Ability to embed form into website
Similar to how we do with the Calendar, it would be great to be able to embed a shared form into a website, as sort of a permanent survey or contact form. Google Forms allows this and itβs often used on websites.
@rullzer said it needs some special view (like Calendar has) and also needs some CSP etc magic set.
Crowdsignal (from Automattic) allows this. See this as an example.
It is useful, but in my opinion less important than a rich questionnaire form builder. For doing user research, I usually explain "please fill out this form hosted on XYZ".
Agree with @ei8fdb ! Definitely nice to have but not a dealbreaker (at least in my similar experiences when we were conducting user research).
I use the same NC instance for different projects and having mismatching visual identities is not so nice. The embedded form would be great, especially with possibility to overwrite styles, as in Nextcloud appointments: https://github.com/SergeyMosin/Appointments
I think simple embedding should work when allowing iframes as described here? https://return2.net/nextcloud-enable-external-iframe/
Yes, it just need a new endpoint like /embed/{formhash} And use a different simple template like https://github.com/nextcloud/files_pdfviewer/blob/419c59d1aa01ba75b3d0645cec28e36c8747dd4d/lib/Controller/DisplayController.php#L59
I use the same NC instance for different projects and having mismatching visual identities is not so nice. The embedded form would be great, especially with possibility to overwrite styles, as in Nextcloud appointments: https://github.com/SergeyMosin/Appointments
overwrite styles or use of html file, in order to create a complex form (several fields on a same line, group of fields, colors, ...) would be great to inscription / contact / request form in a web page.
Another approach would be to record a response to a Form by a post from any html page. In addition this would allow the realization of certain issues while awaiting their integration into Form.
May I have an approximate date of the availability of a such feature? Thanks your app
Lionel,
I agree that it'd be great to hove such feature. Do I understand that you'd like to sponsor the feature?
2 Nov 2020 23:01:27 Lionel-cl [email protected]:
I use the same NC instance for different projects and having mismatching visual identities is not so nice. The embedded form would be great, especially with possibility to overwrite styles, as in Nextcloud appointments: https://github.com/SergeyMosin/Appointments
overwrite styles or use of html file, in order to create a complex form (several fields on a same line, group of fields, colors, ...) would be great to inscription / contact / request form in a web page. May I have an approximate date of the availability of this feature?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub[https://github.com/nextcloud/forms/issues/324#issuecomment-720721973], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ADA26Y5ZANZC6QQDMLXSFXLSN4M2LANCNFSM4MWVVSKQ]. [https://github.com/notifications/beacon/ADA26YY4M7776LXQOZOBFL3SN4M2LA5CNFSM4MWVVSK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFL2VQNI.gif]
@fmorato,
Why not. But only if I am sure that the contents of the app version meet all my needs and not just this feature.
@Lionel-cl While this embed feature have been approved, I cannot guarantee that all of your needs are on the roadmap of this repo.
Please check existing issues and open new tickets if necessary (duplicates will be closed). I'll suggest you arrange yourself with @fmorato to sponsor tickets that are already accepted and set 1. to develop
.
Hi, I would like to quote @Lionel-cl from above:
Another approach would be to record a response to a Form by a post from any html page. In addition this would allow the realization of certain issues while awaiting their integration into Form.
As the Forms API has now been documented, I would like to ask if there is or could be a way of submitting responses anonymously without authentication. I would need something similar to the submission/insert
endpoint, but just without the need of having an user account on the nextcloud instance.
I am wondering if the request token is persistent? If that is the case, one could use an HTML form and then POST the content of the form to Nextcloud. Or am I missing something? Of course a well-supported way to embed the form (with custom styling) would be even better.
Hey @lukasstevens, to be honest i can't exactly answer your question about the request-token. However, for your use-case it sounds like you just want to create your own form and use the API, no? This is already possible using the ocs api, even without the token. You can have a look into the documentation: βΊοΈ https://github.com/nextcloud/forms/blob/master/docs/API.md#insert-a-submission
Not sure if this would be the same request, but it would be welcome if the complete nextcloud instance could be embedded on an trusted iFrame, so with ability to login.
Apart from that I think this would also apply for example to Deck, and the ability to create an embedded link for one, so you could create a shared Kanban board integrated on a separate website. Should I create a separate ticket for such request or would this one fill the need?
Hey @Aesculapius, please take care, this is only the repository for the forms app. So for feature-requests for server or for the deck-app, please head over to the respective repositories. Greets, Jonas
I managed to embed a Nextcloud Forms formular in a static HTML page built with Nikola. The Nikola plugin (see this pull request) extracts the JSON form definition from the public site (shared link) and builds a static HTML form accordingly. When submitting the form data is collected by JS and submitted to the public OCS API of Nextcloud Forms.
This is not including the form as iframe, but suits my use case very well. Maybe this approach serves a starting point for other implementations as well.
Heads up: I had some trouble with sending the form data with a XMLHttpRequest due to CORS limitations. Nextcloud OCS API and Nextcloud Forms don't handle CORS preflight check correctly! The pull requests Nextcloud Forms #1139 and Nextcloud Server should fix it.
Yeah, it almost works!
I linked a Nextcloud Form to an 11ty website, for which I build the form accordingly to the form definition.
The only missing piece of the puzzle is the landing:
- sending the form directly via the HTML
<form>
seems out of question because I hit a CSRF error - intercepting the form submission and sending it via
fetch()
fails because I lack of a CORS configuration (on the NextCloud side of things β I don't know yet if it's due to the server configuration, or a NextCloud setting)