Deploy the assets

The following assets/configurations were deployed on a AEM Forms publish server.

Deploy the sample react app

npm install
npm start

Open the EmergencyContact.js file and change the URL in the fetch method to match your environment.

 const getWebForm=async()=>
        console.log("inside widgetURL function emergency contact");
        // NOTE: replace the `` with your AEM FORM server
        let res = await fetch("",
            method: "POST",
            body: JSON.stringify({"icTemplate":"/content/forms/af/waiver/waiver/channels/print","waiver":formData})


To enable making POST calls to the AEM endpoint from your REACT app, you will need to specify the appropriate entires in the Allowed Origins field in Adobe Granite Cross-Origin Resource Sharing Policy configuration.


See understanding CORS with AEM for more details on CORS configuration options.