In Google Docs, it’s a fairly simple task to create a ‘form’, and then to embed that form into your WordPress footer so that users can report bugs.  The bugs, when submitted, are automatically posted to a spreadsheet in your Google Docs, which can be shared with multiple users.

Step 1 – Create the form in Google

This is a fairly straight forward process. After creating the form, you’ll want to choose “more actions”, “embed” – and grab that code, and put it aside until later.

Creating Google Docs Form

For my own bug tracking form, I’ve chose the following questions:

I also add these fields to the spreadsheet where the data is collected:

For my users, I have a suggested Severity Rating:

Putting the Code in my WordPress footer

I then add a piece of code to my WordPress Footer.  By including the IF statement, users who are NOT logged-in to WordPress won’t see the form.  I do include a link to log-in, so that users can make that simple leap.

<?php if ( is_user_logged_in() ) {
echo ‘GOOGLE FORM EMBED CODE HERE’;
} else {
echo ‘<a href=”/wp-admin”>login</a>’;
};
?>

And replace  GOOGLE FORM EMBED CODE HERE with the embed code you got from Google.  The end result will look like this:

<?php

if ( is_user_logged_in() ) {

echo ‘<iframe src=”http://spreadsheets.google.com/embeddedform?formkey=dGlpYUFVNUpuQzMwd28yUXlldVpXbWc6MQ” width=”760″ height=”721″ frameborder=”0″ marginheight=”0″ marginwidth=”0″>Loading…</iframe>’;

} else {

echo ‘<a href=”/wp-admin”>login</a>’;

};

?>

If you use your Footer include everywhere, the bug reporting form should show up everywhere now.  Just remember to share the Google Docs spreadsheet where the information is being dumped with the relevant users.

Once you’re gotten your bug reporting form where you like it, you can save it as a template, and re-use as needed, saving a lot of effort.


Related Posts
Related Case Studies