Feedback form

Questions or comments?

Purpose

This component allows users to submit feedback for a specific Web page or the Web site in general.

Use when

Working example

English example

French example

How to implement

  1. Migrate the *.html, *.css and *.js files in demos/feedback to the website's layout and design.
  2. Configure the options in the Reason for contacting us field.
  3. Optional: Modify the text in the form as needed.
  4. Optional: The Reason for contacting us field can be selected on page load by adding feedback=[value] to the query string (e.g. feedback=web).

Configuration options

Option Description How to configure Values
feedbackOption 1 Query string parameter for pre-selecting a value in the Reason for contacting us field. Add feedback=[value] to the query string (e.g. feedback=web).
None (default):
Brief description
web:
Critical problem with the website
improvement:
Suggested improvement for the website
subject1:
Question/comment about subject 1
subject2:
Question/comment about subject 2
subject3:
Question/comment about subject 3

Events

Document the public events that can be used by implementers or developers.

Event Trigger What it does
wb-init.wb-fdbck Triggered manually (e.g., $elm.trigger( "wb-init.wb-fdbck" );). Used to manually initialize the feedback form. Note: The feedback form will be initialized automatically unless it is added after the page has already loaded.
wb-ready.wb-fdbck (v4.0.5+) Triggered automatically after the feedback form initializes. Used to identify when the feedback form has initialized
$( document ).on( "wb-ready.wb-fdbck", ".wb-fdbck", function( event ) {
});
$( ".wb-fdbck" ).on( "wb-ready.wb-pic", function( event ) {
});
wb-ready.wb (v4.0.5+) Triggered automatically when WET has finished loading and executing. Used to identify when all WET plugins and polyfills have finished loading and executing.
$( document ).on( "wb-ready.wb", function( event ) {
});

Source code

Feedback form source code on GitHub

Date modified: