Fillable Form Generation Pipeline #239
Replies: 1 comment
-
Hey! It definitely sounds like you've got a handle on the Statiq concepts, which should make this much easier. There are a lot of ways to do anything in Statiq (that's kind of the number one design goal), so I'll drop some thoughts off the top of my head about I might do some of this...
Everything in Statiq Web is actually built on Statiq Framework, so notionally no. That said, a lot of the more complex functionality that's specific to a web environment is in Statiq Web and recreating that from scratch would be really time consuming. Statiq Web is all about utilizing a few pre-configured and developed pipelines so that you can point it at some files and go - if you've got a good enough handle on how pipelines work to write custom ones instead, you might be okay. All that said, longer-term they're all going to merge. As you may or may not be able to tell my time has gotten very limited over the last couple years so I need to par things down complextiy-wise if I'm going to continue supporting this (which I have every intention of doing - current innactivity not withstanding). At some point (I can't say when, but likely when I finally get everything updated to the latest .NET LTS and tick over Statiq 1.0), the Framework/Web/Docs desgination is going to go away entirely and its just going to be Statiq and be entirely MIT without a commercial licensing component. Not sure if that changes how you're thinking about this, but just some food for thought.
I think the biggest thing to do is just make sure it's generic and follows the same conventions that other Statiq modules follow. In theory, there really shouldn't be a difference from a consumer perspective over modules that ship with Statiq vs. third-party ones.
Probably not - a sidecar file is notionally intended to serve the same purpose as front matter in that it contains metadata for another file that contains content. They're typically used when you don't want (or can't have) the metadata in front matter for some reason. What it sounds like you're doing is defining new content that will get consumed by a module (maybe in it's own pipeline, maybe not) and then placed in other content via shortcodes. I think using sidecar files for this might be limiting - I.e. what if you want to reuse the same form on multiple pages? A sidecar file is "tied" to a specific page so that sort of limits the approach if you use them for defining the forms.
Absolutely! Though I'm a little torn on whether it's a good idea. Like I said above, my time is limited which means you'd be at my mercy for updating your code via PRs if it were in-box. I've also been hoping a third-party extension ecosystem kind of organically forms (with some help from the official documentation to point folks to available extension libraries). I think the best approach, at least initially, is to get it developed and published and then drop me a line and I'll include it in a list of resources on the Statiq docs site for folks to find. Let me know if you have any questions along the way - cool project! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Looking at building an extension to Statiq to replace a Jotform integration.
What I would like to do is establish some sort of xaml or yaml format inspired by the format for github issue templates. A pipeline would consume these template files and generate a form on the page using a custom Razor tag or Shortcode. I might also entertain the idea of having them generate their own page.
A few questions:
As for form submit actions, my initial thoughts were to pass this off to JS. Most times I imagine people would just use the form to send an email (think contact forms), but I could also see applications where a REST request is made to an API somewhere. C#/Razor could probably handle this as well, but that will take a bit of thinking. I'm open to ideas for this.
Also, I want this to have some more advanced features, like dynamic questions based on input. For my use case, I have a dropdown where depending on what is selected, that determines what fields are presented. I also want failure states which would prevent the form from being submitted. An example could be a date field requesting the form submitter's birthday, and if they are younger than a certain age prevent them from submitting the form.
Thanks all!
Beta Was this translation helpful? Give feedback.
All reactions