open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
35 stars 27 forks source link

Refactor the SDK snippet in the admin #2146

Open joeribekker opened 1 year ago

joeribekker commented 1 year ago

Thema / Theme

Admin

Omschrijving / Description

The SDK snippet is currently shown at the bottom of the form designer. This snippet is ONLY needed when you want to paste this form on your website.

First of all, this doesn't seem like the best approach: hardcoding the JS snippet in your CMS. Second, if you do this, you typically only do it once, so 99% of the time the snippet is shown for no reason.

Idea: Let's create a new "generator page" where you simply select the form, press "generate snippet" button and it will show the JS/CSS to paste on your website. We can then also provide some basic instructions on how to do it. Additionally, we can add a link on the form detail/designer page that goes to this generator page, with the form pre-selected.

Added value / Toegevoegde waarde

  1. Less cruft in the main form page
  2. Room for additional instructions on the generator page

Aanvullende opmerkingen / Additional context

No response

SilviaAmAm commented 1 year ago

@joeribekker the snippet was removed by this PR: https://github.com/open-formulieren/open-forms/pull/2239

joeribekker commented 1 year ago

I'll leave this ticket exist because of the feature until an actual request comes along to do this, but I'll remove the milestone.

Meanwhile, the fix in the above PR solves the immediate issue.