I am trying to integrate my Contact Form 7
in frontity
on my homepage
.
Initially, I have created my
contact form 7
inWP
and integrated it with my frontity staging app using Frontity Contact Form 7 Package and its working perfectly on Contact page .
Issue to resolve:
But I want to addContact Form 7
in my<Footer />
component. I read the Frontity Contact Form 7 Package setup guide but have found no solution.
Then I tried to execute theshort-code
into myACF Fields
under this endpoint: https://staging.moosaconsulting.com/MC-ACF/wp-json/acf/v3/services_section
I got the rendered form underacf:
key in theJSON
object and then created thecustom-handler
to fetch the rendered form data like this:
import React from "react";
import { connect } from "frontity";
// In a React component that uses "connect":
const Nav1 = ({ state }) => {
const data = state.source.get("acf-srvices-section")
console.log('data');
console.log(data['0'].acf.content);
// return data;
return(
<div
dangerouslySetInnerHTML={{
__html: data['0'].acf.content
}}></div>
);
};
export default connect(Nav);
But it stopped working like Frontity Contact Form-7
Package functionality as it’s not getting treated as CF-7
. Its simple text/html.
Question: Can anybody please suggest solution that how can i render page into page (like Contact Page into the homepage above the footer) or render contact form 7 in my own component not in page???
someone who can let me know how can i use CF-7 in any component or page?**
Thanks