Changeset - 6efbb3695b27
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-02-06 22:50:15
ohnobinki@ohnopublishing.net
Support prefilling the feedback form's feedback textbox with a feedback=<text> querystring and also prefill the chosen college.
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
feedback.php
Show inline comments
 
@@ -26,6 +26,12 @@ include_once 'inc/class.page.php';
 
$fromdom = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
 
$httpagenti = $_SERVER['HTTP_USER_AGENT'];
 

	
 
/* some prefill support */
 
$school = $feedbackpage->get_school();
 
$feedback_text = '';
 
if (isset($_GET['feedback']))
 
  $feedback_text = $_GET['feedback'];
 

	
 
$n = "\n";
 

	
 
?>
 
@@ -38,14 +44,14 @@ include_once 'inc/class.page.php';
 
<h2>Feedback Form</h2>
 
<label for="nameis">Name: </label><input type="text" name="nameis" size="20" /><br />
 
<label for="visitormail">Email:&nbsp; </label><input type="text" name="visitormail" size="20" /> <span class="graytext">(if you want us to get back to you)</span><br />
 
<label for="school">School: </label><input type="text" name="school" size="20" /> <span class="graytext">(if relevant to your feedback)</span><br />
 
<label for="school">School: </label><input type="text" name="school" value="<?php echo htmlentities($school['id']); ?>" size="20" /> <span class="graytext">(if relevant to your feedback)</span><br />
 

	
 
<br/> Overall Rating:<br/> <input checked="checked" name="rating" type="radio" value="Good" />Good <input name="rating" type="radio" value="Buggy" />Buggy  <input name="rating" type="radio" value="Needs more features" />Needs more features <input name="rating" type="radio" value="Don't know" />Don't Know <!-- ' -->
 

	
 
<br /><br />
 
<h3>General Comments</h3>
 
<p>
 
<textarea name="feedback" rows="6" cols="40"></textarea>
 
  <textarea name="feedback" rows="6" cols="40"><?php echo htmlentities($feedback_text); ?></textarea>
 
</p>
 

	
 
<?php
0 comments (0 inline, 0 general)