Adding Loading Spinner on Dwolla-card.js Submit Click

Title says it all. I’m wondering how to add asynchronous UI to my app by triggering a loading spinner to show while I wait for a server response.

Is there a callback I can access for the submit button in the dwolla-card.js form?


Any insight?

Hi @Cody_Eddings! Sorry for the delay in response!

Yes – on submission of the form, there will either be an error or a successful response which is triggered by the JavaScript callback. You can find more information regarding the success/error response bodies in our guide here.

@shreya Right, those are callbacks that are only reached after the server has responded.

I’m asking how I can programmatically display a loading spinner after submit was clicked but before the server has responded. Meaning, I need some way to detect that submit was clicked

Ah, my bad! I read that wrong.

Unfortunately, as of right now, there isn’t a way to detect a click event from within the iFrame. However, this brings up a good point and we’ve created a feedback/enhancement ticket to potentially add a subscriber function that returns a response when the Submit button is clicked. This idea would be similar to the one we have for dwolla.js + Instant Account Verification.

It isn’t guaranteed that the ticket will be picked up in the near future, but I’ll keep you updated! For now, you maybe have to resort to other workarounds.