The problem was when your modal is closed, the div
with class pipedriveWebForms
is not rendered. To fix it you need to load the JavaScript every time you open the modal.
This is what I did:
openModal = () => {
this.setState({ isOpen: true });
const script = document.createElement("script");
script.src = "https://webforms.pipedrive.com/f/loader";
script.defer = true;
document.body.appendChild(script);
this.setState({ pDriveScript: script });
};
closeModal = () => {
this.setState({ isOpen: false });
document.body.removeChild(this.state.pDriveScript);
};
Or just use the embed
tag.
<embed src="https://webforms.pipedrive.com/f/33bqHAoXSWM37q2MD4RrpBN4sx7TNeZ7SfED403dZ90EBjtERc2JOptKx7juMQQrV"/ >
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…