coderedcorp / coderedcms

Wagtail + CodeRed Extensions enabling rapid development of marketing-focused websites.
https://www.coderedcorp.com/cms
Other
668 stars 137 forks source link

Adds Wagtail Formpages to the mix, too. #606

Closed bahoo closed 7 months ago

bahoo commented 7 months ago

Description of change

I had a legacy form page which inherits from Wagtail's own FormMixin, rather than via CodeRed's models. This change simply includes those pages in the admin. My form submission results were inaccessible, otherwise.

Tests

  1. Create a page model which inherits from Wagtail's forms, e.g.
from wagtail.contrib.forms.models import AbstractEmailForm
from wagtail.fields import RichTextField

class FormPage(AbstractEmailForm):
   intro = RichTextField(blank=True)
  1. Make migrations, and migrate.
  2. Create a new page for this FormPage in the Wagtail admin.
  3. Verify that your newly created FormPage is now visible under the Forms tab in the admin.
vsalvino commented 7 months ago

Good catch, thank you for contributing!