• I am using the ccf_successful_submission hook to do some processing on the form data.

    One of the things I need to do is perform validation of the form data using a third-party web service. If the web service indicates a problem with the data, I want to display a message in the browser after the form has been successfully submitted, advising the user to contact us.

    The validation of the data was easy. Getting the message to appear is not.

    I want to do one of two things: Either modify the completion message on the fly; or redirect the browser to a different page containing the warning message.

    I’ve been spending most of my time on the redirect approach. For example, if my third-party validation fails, I want to issue this:

    echo ‘<META HTTP-EQUIV=”Refresh” Content=”0; URL=/problem-message/”>’;

    In my sample code, it works beautifully. On the live site running the Custom Contact Forms plugin, the statement is ignored completely.

    So: Is there any way to either change the completion message using the ccf_successful_submission hook, or to command the plugin to perform a redirect instead of issuing the message? Either would do.

  • The topic ‘Modifying the Success Message (or Redirecting) on the Fly’ is closed to new replies.