Closed frankthoeny closed 8 years ago
The callbacks are set up so that you can do custom things at certain points during the process. If you're wanting to get the values of the hidden fields and do something with them at the callbackSuccess point in the plugin you could modify the callback with the additional parameters. In the processData method starting on line 1680 you could get the values:
var productID = $('#productID').val();
Then add the value to the callback:
// Callback
if (_this.settings.callbackSuccess) {
_this.settings.callbackSuccess.call(this, productID);
}
However, you could accomplish that without modifying the plugin and updating the plugin call (the second code snippet you pasted above) with something like:
'callbackSuccess': function() {
var productID = $('#productID').val();
}
As far as I know you are not able to pass things back to the plugin with callbacks - they are just there to execute custom code at that point. It might help to have more details on what you are trying to do.
I need some help understanding how the callbackSuccess method handles data. Data is undefined and the debug is on. I can see the following objects after entering my zipcode.
lat, lng, origin, name, distance
I have a couple of hidden fields in my form and I want to pass data to the callbackSuccess method.
Form
Store Locator