Hi clarkwinkelmann , I am referring to native flarum notifications for subscriptions, mentions, etc. that are sent via email (mainly) but they are also sent to the users using the built in forum notifications. Today I am using discussion templates as means to generating the discussion post which works, but since a lot of the information must be filled out manually and without any validation it isn't a perfect solution.
My goal is to accomplish the same but using a standard form enforcing field types that formulaire all supports. So if a user submits a form that generates a discussion under a tag, all the users subscribing to that tag will receive the standard email/web notification about the new discussion. Likewise, if I mention a group in the discussion that group receives a notification - this is why I am looking for group selection to be supported.
The formatting of the notifications is very important to me, specifically the emails that I am able to customize with PrettyMail which is why I was thinking having the field responses all appear in the discussion post would be easiest provided each field can have a proper translation to something that will render nicely as markdown (e.g. multi-checkbox gets converted to CSV, group selection to mention format, while most of the others seem to be pretty standard text). Since I can input the exact markdown I want in the post from the feature in formulaire, getting the form field values into text is the main thing here and I can format the rest as needed. My notifications to users today include all the content of the post with nice HTML formatting that match the content of my original discussion post, and discussion replies, all handled by PrettyMail.
clarkwinkelmann Mutating the post content on every submission and edit sounds like a compatibility and formatting nightmare. This would likely require additional custom bbcodes and there's a risk of extensions throwing validation errors that cannot be fixed since the content is automatically generated. It would be more reliable to keep fields separated and just render them in the missing places.
The way I was thinking about, this would only occur when editing a submission from an already created discussion (ie. the edit button your extension adds above the discussion). It would basically re-write the entire post for using the existing feature you have to auto create discussion post that lets the form creators insert the fields where they would like in the post. Since it already supports generating the discussion post body using the format a user provides, I think the only thing it would need to be able to do would be able to update the post it generated to begin with and regenerate the post content using the modified submission. Basically, editing the single submission under that discussion would only update that particular form submission discussion post.