Follow-up to #306662: Add redirect option to site-wide contact forms

Problem/Motivation

There is no way to specify either a custom message, or where the user should be redirected to after the contact form is submitted.

Proposed resolution

Allow user to configure message and redirect route.

Remaining tasks

  • Investigate how Views handles selecting a route, in particular with parameters (e.g. node path)

User interface changes

  • Form element for user to enter "thank you" message
  • Allow user to select a redirect route

API changes

Original report by @frankcarey

This core module is just inches from implementing this and I think it should be a feature moving forward, not a contrib module. Many people would want to direct users to a thank you page, or some additional information instead of sending them back to square 1 (the homepage). I made the changes in a 5.x version for a project at work. Attached are the patches for contact.module and contact.install (uses hook_update_N() so that we could can dump this our sites/all/modules and not hack core)

Functionality: It adds a column to the database and a setting on the site-wide contact admin form. Then the contact form returns that setting instead of and empty sting. This sends users to the appropriate page, if it is set, and defaults to the homepage if it is not.

If you need the 6.x version made, I can do that quick too.

Cheers
Sponsored by http://www.gamefacewebdesign.com

Comments

naveenvalecha created an issue. See original summary.

catch’s picture

Version: 9.x-dev » 8.2.x-dev
Status: Postponed » Closed (duplicate)

Marking this as dup of #306662: Add redirect option to site-wide contact forms after bc policy updates.