0

I am using Ninja form in my WordPress website. And I have a similar form created in Zoho. I have a requirement where I have to fetch and display the Ninja form submission to the Zoho form every time a user submits data. Any idea how to go about it, and which Ninja API to use?

migrated from stackoverflow.com Feb 11 at 14:38

This question came from our site for professional and enthusiast programmers.

0

If you intend to develop a custom solution you should utilise Ninja Forms Actions.

I. Register your custom action.

add_filter( 'ninja_forms_register_actions', 'register_actions' );

function register_actions( $actions ) {
    $actions['zoho'] = new NF_Zoho_Actions_Send();
    return $actions;
}

II. Create an action class.

final class NF_Zoho_Actions_Send extends NF_Abstracts_Action
{
    protected $_name     = 'zoho';
    protected $_timing   = 'normal';
    protected $_priority = '50';

    public function __construct()
    {
        parent::__construct();

        $this->_nicename = 'Zoho CRM';
        $this->_settings = array_merge( 
            $this->_settings, 
            array( ... ) // your custom action settings 
        );
    }

    public function save( $action_settings ) {
    }

    public function process( $action_settings, $form_id, $data )
    {
        // Your Zoho CRM API integration code goes here.

        return $data;
    }
}

III. Method process() will receive action settings (defined in constructor), form ID and form submission data. Next step is to look up Zoho API and see how and what data you need to send.

PS: There is a premium Zoho CRM extension provided by Ninja Forms that probably does what you need and more.

New contributor
mindo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.