Setting Cookie not finding Form Name

Setting Cookie not finding Form Name

Cookies are not saving properly for a form page that I am working on.

When I try to set the submit button to store a cookie "CustomerName" from the field "CustomerName" the form/fields show up with (undefined) as the form name. It is the same with all of the fields in your dialog box.