"Request Tech Support" Side Tab Website Widget
How about a slide out website form with a "Request Tech Support" tab that will automatically create a ticket.
-
Michael Leone commented
Thats an easy one to create using Repairshopr API mate. Grab the sample leads web form (have copied it down below for you) and pay a cheap programmer from upwork.com to make a slide out webform out of it for your website. Here is the code, give them this and tell them you want a slide out widget, piece of cake for any most web programmers:
<?php
if( $_POST["name"] )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://YOUR_SUBDOMAIN.repairshopr.com/api/v1/leads?api_key=YOUR_API_KEY");
curl_setopt($ch, CURLOPT_POST, 1);
// example splitting a name field into first and last name bits
$pieces = explode(" ", $_POST['name']);
$last_name_parts = array_slice($pieces, 1); //each word
$last_name = implode(" ", $last_name_parts); //combined words, with space separators
// build up the lead post data here, you can combine fields into the data you are sending
// see subject for an example
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('first_name' => $pieces[0],
'last_name' => $last_name,
'email' => $_POST['email'],
'phone' => $_POST['phone'],
'ticket_problem_type' => $_POST['problem'],
'city' => $_POST['city'],
'ticket_subject' => $_POST['device'] . " Pri: " . $_POST['priority'],
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
//redirect to thanks page
header("Location: /thanks.html");
exit();
}
?><html>
<body>
<form action="<?php $_PHP_SELF ?>" method="POST">Name: <input type="text" name="name" /> <br>
Email: <input type="text" name="email" /><br>
Phone: <input type="text" name="phone" /><br>
Problem: <input type="text" name="problem" /><br>
City: <input type="text" name="city" /><br>
Device Type: <select name='device'>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<br>
Priority: <select name='priority'>
<option value="p3">Low</option>
<option value="p2">Medium</option>
<option value="p1">High</option>
</select>
<br>
<input type="submit" />
</form>
</body>
</html>