Skip to content Skip to sidebar Skip to footer

Form To Perform Action And Passover The Values

Hi i basically have a form that has a two textboxes which will send the data back to the google spreadsheet, as i have attached my form to the google form, if u know how to do thi

Solution 1:

To get the form values on submit, just use

$(document).ready(function () {
    $('form').submit(function () {
        var tb2_val = $('input#tb2', $(this)).val();
        // do something with tb2_val

        // return false; // uncommenting this will prevent the submit action
    });
});

As far as passing values between pages, you'll have to determine how you'll handle that (cookies, url parameters, store to db/retrieve from db, html5 local storage, etc). Once you determine your method, grab the value and do

$(document).ready(function () {
    var thevalue = ///
    $('form').find('input#tb1').val(thevalue);
});

Post a Comment for "Form To Perform Action And Passover The Values"