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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.54.0] - 2026-04-01
11
+
12
+
### Added
13
+
-**Success Pages** — Three new fields on `FormDefinition` control post-submission routing, evaluated in priority order:
14
+
-`success_redirect_rules` (JSONField) — array of conditional redirect rules; first match wins. Each rule combines a `url` with any condition the existing evaluate-conditions engine understands (simple field equality, compound AND/OR, etc.).
15
+
-`success_redirect_url` (CharField) — static redirect URL, applied when no rule matches.
16
+
-`success_message` (TextField) — custom HTML rendered at `/submissions/<id>/success/` when no redirect is configured.
17
+
- New `submission_success` URL (`forms_workflows:submission_success`) and view; template `submission_success.html` with "My Submissions" / "Back to Forms" navigation.
18
+
-**Answer piping** — `{field_name}` token substitution available in three places:
19
+
-*Success messages & redirect URLs* — `_pipe_answer_tokens()` helper resolves tokens server-side from `form_data`; list-valued fields are comma-joined; unknown tokens become empty strings.
20
+
-*Notification subjects* — `subject_template` on `NotificationRule` now resolves `{field_name}` tokens alongside `{form_name}` and `{submission_id}` via a `defaultdict(str)` (fail-open: unknown tokens → empty string).
21
+
-*Live form labels* — new JS block in `form_submit.html` scans `<label>`, `<small>`, and `.form-text` elements for tokens, attaches `input`/`change` listeners, and replaces them in real-time as the user types.
22
+
-**`form_data` in notification email context** — the full `form_data` dict is now passed to every notification template so HTML templates can reference `{{ form_data.field_name }}` directly.
23
+
-**Form builder: Success Page settings panel** — redirect URL input, conditional rules JSON editor, success message textarea with piping syntax hints, and a CAPTCHA toggle; all values round-trip through `form_builder_load` / `form_builder_save`.
24
+
-**Migration `0081`** (`0081_add_success_page_fields`) — adds `success_message`, `success_redirect_url`, and `success_redirect_rules` to `FormDefinition`.
25
+
26
+
### Documentation
27
+
-`docs/POST_SUBMISSION_ACTIONS.md` — new **Success Pages** and **Answer Piping** sections.
28
+
-`docs/NOTIFICATIONS.md` — new **Answer Piping in Subjects** section; `form_data` template context documented.
29
+
-`docs/FORM_BUILDER_USER_GUIDE.md` — Submission Controls panel, Success Page settings panel, palette search, and four new field types documented.
30
+
-`docs/CLIENT_SIDE_ENHANCEMENTS.md` — new **Real-Time Answer Piping** section (§ 6).
31
+
32
+
### Tests
33
+
- New tests in `tests/test_views.py`: `TestPipeAnswerTokens` (9 cases), `TestSubmissionSuccessView` (5 cases), `TestSuccessRouting` (10 cases).
34
+
- New tests in `tests/test_notifications.py`: 5 cases covering subject piping, unknown-field fail-open, built-in placeholders, list-value comma-join, and `form_data` in template context.
help_text="Custom HTML shown after submission. Supports answer piping with {field_name} tokens that are replaced with the submitted values. Leave blank for the default confirmation message.",
22
+
),
23
+
),
24
+
migrations.AddField(
25
+
model_name="formdefinition",
26
+
name="success_redirect_rules",
27
+
field=models.JSONField(
28
+
blank=True,
29
+
help_text='Conditional redirects based on form data. Format: [{"field": "field_name", "operator": "equals", "value": "...", "url": "https://..."}]. First matching rule wins; falls back to success_redirect_url or the default page.',
30
+
null=True,
31
+
),
32
+
),
33
+
migrations.AddField(
34
+
model_name="formdefinition",
35
+
name="success_redirect_url",
36
+
field=models.URLField(
37
+
blank=True,
38
+
help_text="Redirect to this URL after submission instead of showing a success page.",
<textareaclass="form-control form-control-sm" id="formSuccessMessage" rows="3" placeholder="Thank you, {first_name}! Your {form_type} request has been submitted."></textarea>
732
+
<smallclass="text-muted">Shown after submission. Use <code>{field_name}</code> for answer piping. Leave blank for default.</small>
0 commit comments