You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
Headings group fields nicely in forms but are absent from emails.
Some text may also be a statement that we ask people to agree to so is an essential part of the email.
The text was updated successfully, but these errors were encountered:
For anybody who works on this, I'll outline what's going on and some recommendations for addressing the issue. I'll focus on the "Header" field type, but it applies equally to the "Rich Text" field type.
First, the header field doesn't send any data to the server when the form is submitted, and so the submissions controller doesn't pass on this field as one that should be included in an email. Here's the data that get submitted in the submissions controller:
The first thing that probably ought to change is to set a value for the header field so the submissions controller knows to pass it along to handlers for inclusion in emails. A good place to do that might be when the frontend field is created:
Since many people will not want headers in their emails, it probably makes sense for this feature to be opt in. That could either be at the form level or at the handler level. I'd suggest that this would be better suited at the handler level, as it seems odd for fields to know about specific handlers (i.e., it'd be weird for the header field to have a setting to ensure it gets included in emails).
I'm imagining a setting on the email handler that says something like "Include Transitory Fields?" Then the description for that setting would say something like "Transitory fields are fields that don't have any data associated with them, such as headers, rich text, and buttons." This setting might go here between these two other settings:
Finally, you'll need to modify the code in the email handler to ensure the "Text Value" for the header is included in the email:
You'll also want to consider how this change might impact the other form submission handlers, such as "Send Data" and "Store Data" (not to mention other custom ones other people may have written outside of the core of Formulate).
Headings group fields nicely in forms but are absent from emails.
Some text may also be a statement that we ask people to agree to so is an essential part of the email.
The text was updated successfully, but these errors were encountered: