Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
webOS PhoneGap Support Example
<!DOCTYPE html>
This is an example of using form fields in PhoneGap to compose an email message. More details are available in this blog post:
Ken Schreihofer
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>webOScapades PhoneGap Support App</title>
<script type="text/javascript" src="phonegap-1.0.0.js"></script>
<script type="text/javascript">
function onLoad() {
function formSubmit(){
var datestamp=new Date();
var title= "Support Request from "+ document.getElementById('name').value;
var text_cont="Name: "+document.getElementById('name').value+"<br/>E-mail Address: "+document.getElementById('add').value+"<br />Timestamp: "+datestamp+"<br />Problem: "+document.getElementById('problem').value;
try {
this.service = navigator.service.Request('palm://com.palm.applicationManager', {
method: 'launch',
parameters: {
id: "",
params: {
summary: title,
text: text_cont,
recipients: [{
contactDisplay:"John Smith"
catch(ex) {console.log("error");}
<body onload="onLoad();">
<h2 align="center">Support Request</h2>
<h3 align="center">Help us help you!</h3>
<p align="center">Please fill out the below form to contact support.</p>
<form align="center" name="oForm">
<tr><td align="right">Name:</td>
<td><input type="text" name="name" id="name" /></td></tr>
<tr><td align="right">E-mail:</td>
<td><input type="text" name="add" id="add" /></td></tr>
<tr><td align="right">Problem:</td>
<td><textarea rows="5" cols="22" name="problem" id="problem"></textarea></td></tr>
<input type="button" onclick="formSubmit()" value="Submit form" align="center"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment