0

I'm new to Drupal. I have created a web form in my page using Webform module. I added my contact web form in a custom panel page. I use the Clientside Validation module to validate the web forms.

If the form validation is okay, I want to show the confirmation message at the top of the web form in my panel page instead of the default message location used in the page.tpl.php. I use the single page web site.

Can anyone help me to solve my problem?

1
  • I would implement a single-page website by writing a custom module. It would reduce dependencies of other modules and make the site lightweight.
    – Sithu
    Commented Jul 13, 2013 at 4:42

1 Answer 1

1

I guess the problem is that the Clientside Validation module shows the message in the default location defined in the template.

You can check Clientside Validation Usage. Then you can see Error Message placement and Default location. I hope you can tweak your default message location from this:

Here you can select the default location to display your error messages. You can choose between the following options:

  • jQuery selector: This option will place a div containing all the error messages inside the div that matches the jQuery selector
    entered in the "jQuery selector" field below this option.
  • Top of form: This option will place a div containing all the error messages above the form the error messages are for.
  • Before label: This option will place the error before the label of the matching element
  • Afterlabel: This option will place the error after the label of the matching element
  • Before input: This option will place the error before the matching element
  • After input: This option will place the error after the matching element
  • Top of first form: This option will place a div containing all the error messages above the first form. This means that when there are multiple forms on a page, the errors of the second form will be added to the error div of the first form and will be displayed above the first form
  • Custom function: (Advanced) Selecting this option requires you to enter a javascript function name in the textfield "Custom function name" below this option. This function name will be given to the errorPlacement option of jQuery.validate()

You could use jQuery selector or Custom function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.