---
{
	"title": "Feedback form",
	"language": "en",
	"category": "Other",
	"categoryfile": "other",
	"description": "Allows users to submit feedback for a specific Web page or Web site.",
	"altLangPrefix": "feedback",
	"dateModified": "2014-08-04"
}
---
<span class="wb-prettify all-pre hide"></span>

<section>
	<h2>Purpose</h2>
	<p>This component allows users to submit feedback for a specific Web page or the Web site in general.</p>
</section>

<section>
	<h2>Use when</h2>
	<ul>
		<li>Common feedback form that is available from anywhere on a website.</li>
	</ul>
</section>

<section>
	<h2>Working example</h2>
	<p><a href="../../../demos/feedback/feedback-en.html">English example</a></p>
	<p><a href="../../../demos/feedback/feedback-fr.html">French example</a></p>
</section>

<section>
	<h2>How to implement</h2>
	<ol>
		<li>Migrate the *.html, *.css and *.js files in demos/feedback to the website's layout and design.</li>
		<li>Configure the options in the Reason for contacting us field.</li>
		<li><strong>Optional:</strong> Modify the text in the form as needed.</li>
		<li><strong>Optional:</strong> The Reason for contacting us field can be selected on page load by adding <code>feedback=[value]</code> to the query string (e.g. <code>feedback=web</code>).</li>
	</ol>
</section>

<section>
	<h2>Configuration options</h2>
	<table class="table">
		<thead>
			<tr>
				<th>Option</th>
				<th>Description</th>
				<th>How to configure</th>
				<th>Values</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><code>feedback</code>Option 1</td>
				<td>Query string parameter for pre-selecting a value in the Reason for contacting us field.</td>
				<td>Add <code>feedback=[value]</code> to the query string (e.g. <code>feedback=web</code>).</td>
				<td>
					<dl>
						<dt>None (default):</dt>
						<dd>Brief description</dd>
						<dt><code>web</code>:</dt>
						<dd>Critical problem with the website</dd>
						<dt><code>improvement</code>:</dt>
						<dd>Suggested improvement for the website</dd>
						<dt><code>subject1</code>:</dt>
						<dd>Question/comment about subject 1</dd>
						<dt><code>subject2</code>:</dt>
						<dd>Question/comment about subject 2</dd>
						<dt><code>subject3</code>:</dt>
						<dd>Question/comment about subject 3</dd>
					</dl>
				</td>
			</tr>
		</tbody>
	</table>
</section>

<section>
	<h2>Events</h2>
	<p>Document the public events that can be used by implementers or developers.</p>
	<table class="table">
		<thead>
			<tr>
				<th>Event</th>
				<th>Trigger</th>
				<th>What it does</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>wb-init.wb-fdbck</td>
				<td>Triggered manually (e.g., <code>$elm.trigger( "wb-init.wb-fdbck" );</code>).</td>
				<td>Used to manually initialize the feedback form. <strong>Note:</strong> The feedback form will be initialized automatically unless it is added after the page has already loaded.</td>
			</tr>
			<tr>
				<td><code>wb-ready.wb-fdbck</code> (v4.0.5+)</td>
				<td>Triggered automatically after the feedback form initializes.</td>
				<td>Used to identify when the feedback form has initialized
					<pre><code>$( document ).on( "wb-ready.wb-fdbck", ".wb-fdbck", function( event ) {
});</code></pre>
					<pre><code>$( ".wb-fdbck" ).on( "wb-ready.wb-pic", function( event ) {
});</code></pre>
				</td>
			</tr>
			<tr>
				<td><code>wb-ready.wb</code> (v4.0.5+)</td>
				<td>Triggered automatically when WET has finished loading and executing.</td>
				<td>Used to identify when all WET plugins and polyfills have finished loading and executing.
					<pre><code>$( document ).on( "wb-ready.wb", function( event ) {
});</code></pre>
				</td>
			</tr>
		</tbody>
	</table>
</section>

<section>
	<h2>Source code</h2>
	<p><a href="https://github.com/wet-boew/wet-boew/tree/master/src/other/feedback">Feedback form source code on GitHub</a></p>
</section>
