Plop this little javascript function in your custom gf code:
function SetFormProperty(name, value) {
form[name] = value;
}
Example Usage
<select id="form_type" name="form_type" onchange="SetFormProperty('form_type', jQuery(this).val());"></select>
<input type="text" id="form_name" class="fieldwidth-3" onkeyup="SetFormProperty('form_name', this.value);" size="35"/>