To pass data between the client side in the browser and your server side component you need to use either AJAX or Web sockets base to communicate. Via a JS function on your page you make a connection with your server and execute the helper function and then return the data to the JS function that then changes the values on your page.
AJAX comes in two ...
I would use field groups instead of prefixes to organize fields in the form. This way no additional code is needed: