You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using the portal with an external page to get name and phone number of each person who wants to use the network.
The client first gets a page with a 'Connect' button and then is redirected to a form page.
Two problems :
1- I'd like to avoid these two steps and make it one step
2- Validating the form is not really giving access it only gets the filed infos, in real access is already there.
So I think this API could be a solution but my dev skills are at their limits here.
As the form page is running a JS script to post data to a database, as far as I understood I need the script to post to both the database and to the API using only one button and I didn't find how to do that.
<script type="text/javascript">
/** This section is only needed once per page if manually copying **/
if (typeof MauticSDKLoaded == 'undefined') {
var MauticSDKLoaded = true;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://database.mydomain.com/media/js/mautic-form.js';
script.onload = function() {
MauticSDK.onLoad();
};
head.appendChild(script);
var MauticDomain = 'https://database.mydomain.com';
var MauticLang = {
'submittingMessage': "Please wait..."
}
}else if (typeof MauticSDK != 'undefined') {
MauticSDK.onLoad();
}
</script>
As you can read this is Mautic code (but I think the solution could be used for many other) and Mautic is running on PHP, so I beleive the mariage is possible.
An alternative method is calling a JS script which generates these lines, but of course, in this case it's not possible to modify the code or you have to modify Mautic's core code (or make a plugin which is beyond the scope of my question).
If ever somone has a few minutes to look into this...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
HI,
I'm currently using the portal with an external page to get name and phone number of each person who wants to use the network.
The client first gets a page with a 'Connect' button and then is redirected to a form page.
Two problems :
1- I'd like to avoid these two steps and make it one step
2- Validating the form is not really giving access it only gets the filed infos, in real access is already there.
So I think this API could be a solution but my dev skills are at their limits here.
As the form page is running a JS script to post data to a database, as far as I understood I need the script to post to both the database and to the API using only one button and I didn't find how to do that.
Here is the HTML form code :
And the JS code :
As you can read this is Mautic code (but I think the solution could be used for many other) and Mautic is running on PHP, so I beleive the mariage is possible.
An alternative method is calling a JS script which generates these lines, but of course, in this case it's not possible to modify the code or you have to modify Mautic's core code (or make a plugin which is beyond the scope of my question).
If ever somone has a few minutes to look into this...
Thanks a lot
regards
V.
Beta Was this translation helpful? Give feedback.
All reactions