You bet. Put this onclick on your input type = submit:
onclick="_gaq.push(['_trackEvent', 'Form', 'Submit'],['_setCustomVar', 0, 'Name', 'Value', 1], ['_trackPageview', '/thankyoupage']);"
Essentially, you are doing One Push, Multiple Commands - https://developers.google.com/analytics/devguides/collection/gajs/#MultipleCommands. Just remember that a Custom Variable must always get sent with either a pageview or event.