diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ef8d8d446..ff9acdbc9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -18,6 +18,7 @@ Changelog
* Add StreamFieldPanel to available panel types in documentation (Dan Swain)
* Add {{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain)
* Add ability to filter image index by a tag (Benedikt Willi)
+ * Add formal support for nested InlinePanels (Matt Westcott)
* Fix: Rename documents listing column 'uploaded' to 'created' (LB (Ben Johnston))
* Fix: Submenu items longer then the page height are no longer broken by the submenu footer (Igor van Spengen)
* Fix: Unbundle the l18n library as it was bundled to avoid installation errors which have been resolved (Matt Westcott)
diff --git a/docs/releases/2.8.rst b/docs/releases/2.8.rst
index 00db4f51c..ed1b52cfc 100644
--- a/docs/releases/2.8.rst
+++ b/docs/releases/2.8.rst
@@ -27,6 +27,7 @@ Other features
* Add StreamFieldPanel to available panel types in documentation (Dan Swain)
* Add {{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain)
* Add ability to filter image index by a tag (Benedikt Willi)
+ * Add formal support for nested InlinePanels (Matt Westcott)
Bug fixes
diff --git a/wagtail/admin/forms/models.py b/wagtail/admin/forms/models.py
index 16a1be8bb..1d192b953 100644
--- a/wagtail/admin/forms/models.py
+++ b/wagtail/admin/forms/models.py
@@ -66,6 +66,10 @@ class WagtailAdminModelFormMetaclass(ClusterFormMetaclass):
new_class = super(WagtailAdminModelFormMetaclass, cls).__new__(cls, name, bases, attrs)
return new_class
+ @classmethod
+ def child_form(cls):
+ return WagtailAdminModelForm
+
class WagtailAdminModelForm(ClusterForm, metaclass=WagtailAdminModelFormMetaclass):
@property
diff --git a/wagtail/admin/tests/pages/test_edit_page.py b/wagtail/admin/tests/pages/test_edit_page.py
index 1ca08ab8a..8cdab8231 100644
--- a/wagtail/admin/tests/pages/test_edit_page.py
+++ b/wagtail/admin/tests/pages/test_edit_page.py
@@ -19,6 +19,7 @@ from wagtail.tests.testapp.models import (
EVENT_AUDIENCE_CHOICES, Advert, AdvertPlacement, EventCategory,
EventPage, EventPageCarouselItem, FilePage, ManyToManyBlogPage, SimplePage, SingleEventPage, StandardIndex, TaggedPage)
from wagtail.tests.utils import WagtailTestUtils
+from wagtail.tests.utils.form_data import inline_formset, nested_form_data
class TestPageEdit(TestCase, WagtailTestUtils):
@@ -1632,3 +1633,92 @@ class TestValidationErrorMessages(TestCase, WagtailTestUtils):
self.assertContains(response, """
This field is required.
""", count=1, html=True)
# Error on title shown in the header message
self.assertContains(response, "