Integrating and using custom plugin on button press
-
Environment:
We’ve got an external front end website in WordPress that serves as a front for our core website, and we’re implementing self sign up. We have a sign up form, but the form button needs to call an internal API to create the user, passing the form data, and showing any potential errors returned. Success should result in a redirect to the core website.Problem:
I’ve created an external API as a JS bundle (webpack) that I want to install as a custom plugin. I want to install the plugin or manually add a <script> tag to import this library plugin. I want to, on submit button click, pass the form data to the API (which knows how to talk to our core site and server). If an error occurs, I want to display it on the form page. If a success occurs, I want to redirect to the core website.This is my first time ever working with WordPress, so I’m unsure of how to do this, or if it’s possible. If anyone knows if this is possible, or other potential solutions, it would be much appreciated. If it’s too much work, or not possible, to do this in WordPress, we’ll just take ownership of this in our core app (outside of WebPress.)
The topic ‘Integrating and using custom plugin on button press’ is closed to new replies.