Subscribe Form...React
[solved]
Hi, I want to include the subscribe form in a react (docusaurus) site. I want to have a button that will just pop up the form as a modal.
I was thinking to convert the form into a React component and simple submit using fetch like so (frontend is not my strong suite)
can this be done?
am I going about this the wrong way?
5 Replies
Hi Mario. Great question. I'll get one of our front-end developers to get back to you by end of Monday AEDT.
@Claire_Kinde , thank you
Hi @mariodebono, without checking I suspect this could throw a CORs error?
Do you have access to any backend service or workers?
Hi @Daniel_Kinde, I don't think I saw a cors error. I'll need to check it out and let you know later this week.
Cheers
Hi, @Daniel_Kinde , if I am able to use fetch and not the form snippet provided, am I allowed to use my own form given I keep your branding with the form?
I still haven't tested it but I can just test the fetch later and if that works I would prefere to have a small inline form on my landing page instead.
What do you think?
@Daniel_Kinde , The fetch example above works, I think it needed the extra headers (working example below for the next guy)
The last question remains, am I allowed to use my own inline form (keeping your branding)?
Hi @mariodebono Yes that is all good π