The following example shows how to use the imPagePopulate plugin with calculated fields using the "format" option. For the example below, I am multiplying the number of DVD's sold by 3 to get the total amount of viewers (because we know that more than one person per household is viewing the DVDs!!!!). The data returned must be a Json object. In this case, the data returned is as follows:
'[{"first_name": "Jack", "last_name": "O\'neal", "address1": "227 Cheyenne Mountain", "address2": "Suite SG1", "city": "Colorado Springs", "states": "4",
"zip_code": "80914", "home_phone": "719-561-2222", "email": "soneal@stargatecommand.gov", "hobby1": "Fishing", "hobby2": "Exploring New Worlds", "love_first": "Samantha", "love_last": "Carter",
"dvd_sold": "20000000"}]'
View the source code for this page to view how to use the plugin. For documentation about the imValidateForm plugin, view the blog post.