Basic Customization > User Interface Customization > Constructing Wizards > Client Generated Form Data > Solution > Procedure – Submitted Client-generated hidden form data > Add your application’s client-side logic
  
Add your application’s client-side logic
Create a new Javascript file, …/netmarkets/javascript/MYAPPLICATION/MYJSFILE.js , that will contain the application's listener for the 'submit' event that will be signaled for the wizard's table. Code should follow this outline:
// Establish namespace
PTC.MYAPPLICATION={};

// Define wizard table 'submit' listener
PTC.MYAPPLICATION.MYLISTENER = function (table)
{
// see PTC.fakeLiterature.submitListener() code in
// /netmarkets/javascript/carambola/dataStoreOnlyExample.js};


// Add submit listener for wizard table once the table becomes 'available'
PTC.onAvailable
( 'MYTABLEID', function (table)
{
table.on ('submit', PTC.MYAPPLICATION.MYLISTENER);
});
}
In this example, the submit listener is adding hidden input data to the submitted form, using JCAappendFormHiddenInput. In this example, the client-side logic looks for two hidden properties that have been added to each row in the table with ID 'MYTABLEID'. Those properties exist on each row in the data-store, but are not included in the DOM of the table that appears in the UI. These properties are named “hiddenColumn1” and “hiddenColumn2”. If either of these hidden properties is found on an object, a hidden input field is generated that identifies the object [row.get (“objectHandle”)] and the hidden value itself (“hiddenColumn1”, etc.) and which specifies a not-very-useful constant value.
The example also shows how to add a hidden input value that is not associated with any hidden column, but still identifies a specific object (see the second call to JCAappendFormHiddenInput, above).
Of course, this same type of listener could be used to add, change, or remove any desired data to the form before it is submitted; it is not limited to manipulating so-called “data store only” fields.