python

Wagtail FormBuilder - how to use form data in the landing template?  #angularjs #reactjs

  • Stack Overflow works best with JavaScript enabled
  • Join the Stack Overflow Community
  • I used Wagtail’s contributed Form builder module to create a simple Contacts form in Wagtail Admin.
  • Wagtail’s Read The Docs page on Form builder only states that form is part of the context for the form_page.html template, while the form_page_landing.html template is a standard template.
  • I would like to use the entered name in the Name field to personalize the response message to the user who used the contact form.

I used Wagtail’s contributed Form builder module to create a simple Contacts form in Wagtail Admin. The form has the dynamically added fields Name, Email, Subject and Message; the model ContactPage inherits from AbstractForm.

@ng_real_ninja: Wagtail FormBuilder – how to use form data in the landing template? #angularjs #reactjs

I used Wagtail’s contributed Form builder module to create a simple Contacts form in Wagtail Admin. The form has the dynamically added fields Name, Email, Subject and Message; the model

The problem:

I would like to use the entered name in the Name field to personalize the response message to the user who used the contact form. Wagtail’s Read The Docs page on Form builder only states that

form

is part of the context for the form_page.html template, while the form_page_landing.html template is a standard template. Is it possible to access the form-submitted values through the context of the landing template out of the box somehow? If not, could anyone give an example how/what page function to override, in order to add the information I need to the context? Thanks!

python

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.