Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Wagtail Form Builder doesn't support translations?

I am using wagtail translations outlined here for some of my page models. They are working as expected. I am adding a form via the form builder I can access the forms via the url www.domain.com/slug but when I fill it out the url redirects to a None url. Also in the admin, if I click on the LIVE button, it directs to a None url as well.

I assumed it had to do with not being hooked up to the translations because, by default, that is adding a url slug for each language in the promote panel of a page. So I hooked up the form model to the translations and the content panels are getting the correct translations, but the promote panel still only receives a slug field. There is no other fields for the different languages.

The LIVE button still gives a None and when I submit the form on the page, it redirects to a None page with an error. Again, all my other pages that are hooked up with the translations work as expected.

I'm assuming the Wagtail forms don't fully support the translations. With internationalization like this, is it an all or nothing deal? I can't leave the forms outside of the translations situation?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

So after examining the issue more, I had to import Page into the AbstractEmailForm class in order to make it work. This is verbatim what is taken from the Wagtail docs and adding the Page in.

from modelcluster.fields import ParentalKey
from wagtail.wagtailadmin.edit_handlers import (
    FieldPanel, FieldRowPanel,
    InlinePanel, MultiFieldPanel
)
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailforms.models import AbstractEmailForm, AbstractFormField


class FormField(AbstractFormField):
    page = ParentalKey('FormPage', related_name='form_fields')


class FormPage(AbstractEmailForm, Page):
    intro = RichTextField(blank=True)
    thank_you_text = RichTextField(blank=True)

    content_panels = AbstractEmailForm.content_panels + [
        FieldPanel('intro', classname="full"),
        InlinePanel('form_fields', label="Form fields"),
        FieldPanel('thank_you_text', classname="full"),
        MultiFieldPanel([
            FieldRowPanel([
                FieldPanel('from_address', classname="col6"),
                FieldPanel('to_address', classname="col6"),
            ]),
            FieldPanel('subject'),
        ], "Email"),
    ]

Wagtail translations needs to use Page to change the URLS. This fixes the None issue.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!