<?php
/**
* ChronoForms 8
* Copyright (c) 2023 ChronoEngine.com, All rights reserved.
* Author: (ChronoEngine.com Team)
* license:     GNU General Public License version 2 or later; see LICENSE.txt
* Visit http://www.ChronoEngine.com for regular updates and information.
**/
defined('_JEXEC') or die('Restricted access');

if(strlen($params->get('chronoform', '')) > 0){
	require_once(JPATH_ROOT."/administrator/components/com_chronoforms8/extension.php");
	$app = ChronoApp::Instance("chronoforms8");

	// if ajax form, display it
	if(!empty($app->data("output") == "component")){
		$app->processExtension(action:"view", params:["chronoform" => $app->data("chronoform")]);
		return;
	}

	$app->processExtension(action:"view", params:["chronoform" => $params->get('chronoform', '')]);
}
