title: Gravity Forms & ReactJS - Loading Form into Modal and submitting
body: <p>I am currently stuck on a problem with Gravity Forms and ReactJS. I am trying to load a Gravity Form as a Modal in a ReactJS component for contact purposes. Basically, how I am currently set up is by doing a <code>GET</code> from the <code>WP-API</code> for the page with the form loaded in, and then using <code>dangerouslySetInnerHTML</code> to build the page in the component. The problem is though that when I try to submit the form, its giving me a problem with the <code>POST</code>. Its trying to submit it to the <code>URL</code> from the <code>GET</code>. I can use some serious help here on what would be the best approach.</p>
  
  <pre><code>import React, { PropTypes } from 'react';
  import Modal from 'react-modal';
  import $ from 'jquery';
  
  class RequestContactModal extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        content: ''
      };
    }
  
    componentWillMount() {
      const wpApiUrl = '../wp-json/wp/v2/pages/61';
  
      $.ajax({
        url: wpApiUrl,
        type: 'GET'
      })
        .done((response) =&gt; {
          console.log(response);
          this.setState({
            content: response.content.rendered
          });
        })
        .fail((response) =&gt; {
          console.log('fail');
          console.log(response);
        });
    }
  
    handleSubmit = (ev) =&gt; {
      ev.preventDefault();
      this.props.closeModal();
    }
  
    handleCloseClick = (ev) =&gt; {
      ev.preventDefault();
      this.props.closeModal();
    }
  
    render() {
      const customStyles = {
        overlay: {
          backgroundColor: 'rgba(0, 0, 0, 0.65)'
        },
        content: {
          top: '50%',
          left: '50%',
          right: 'auto',
          bottom: 'auto',
          marginRight: '-50%',
          transform: 'translate(-50%, -50%)',
          background: '#fff'
        }
      };
  
      return (
        &lt;Modal
          isOpen={this.props.isOpen}
          onRequestClose={this.props.closeModal}
          style={customStyles}
        &gt;
          &lt;div&gt;
            &lt;p&gt;Gravity Forms&lt;/p&gt;
            &lt;div dangerouslySetInnerHTML={{__html: this.state.content}} /&gt;
          &lt;/div&gt;
        &lt;/Modal&gt;
      );
    }
  }
  
  RequestContactModal.propTypes = {
    closeModal: PropTypes.func.isRequired,
    isOpen: PropTypes.bool
  };
  
  RequestContactModal.defaultProps = {
    isOpen: false
  };
  
  export default RequestContactModal;
  </code></pre>