Hello,
in Joomla (3.8.6) I would like to install a Chronoform V6 form in a self-written component (address directory).
Logic: ... bla..bla .. IF ($address-> email) { show mailform } ... bla ..bla ..
I have tried 2 ways to show the form:
Thankful for help or any idea
Regards
Thomas
in Joomla (3.8.6) I would like to install a Chronoform V6 form in a self-written component (address directory).
Logic: ... bla..bla .. IF ($address-> email) { show mailform } ... bla ..bla ..
I have tried 2 ways to show the form:
- As PopUp:
JHTML:: _('behavior.modal');
<a class="modal" id="load_chrono" href="/index.php?option=com_chronofrom6&chronoform=mailform&tmpl=component" rel="{handler:'iframe', size:{x:500, y: 649} }"> Send mail </a>
That way, it works well. - Embedded:
$ module = JModuleHelper :: getModule ('mod_chronoforms6', 'mailform');
if ($ module-> id) {echo JModuleHelper :: renderModule ($ module);}
That way, the form will be displayed but will not work.
No validation, no calendar, .... no functionality.
Not even if I adjust the action URL in Form-> Setup.
Thankful for help or any idea
Regards
Thomas
Hi Thomas,
At a guess the second method is not loading any of the ChronoForms support files into your modal window.
Bob
At a guess the second method is not loading any of the ChronoForms support files into your modal window.
Bob
First of all let me thank you for the quick response :-)
May be it could be a misunderstanding?
1. is modal (modal iframe) and it works well.
2. is embedded: should renderModule($ module) under the condition that email is stored in database.
Unfortunately 2. is suitable. Form is rendered in place but did not work proper.
Is it reasonable/possible to load/include Chronoforms support files manually .
And if so, which are necessary.
Regards
Thomas
May be it could be a misunderstanding?
1. is modal (modal iframe) and it works well.
2. is embedded: should renderModule($ module) under the condition that email is stored in database.
Unfortunately 2. is suitable. Form is rendered in place but did not work proper.
Is it reasonable/possible to load/include Chronoforms support files manually .
And if so, which are necessary.
Regards
Thomas
Hi Thomas,
Have you checked to see if the CF support files are being loaded?
Bob
Have you checked to see if the CF support files are being loaded?
Bob
Hi Bob,
there is an essential difference in the html source of the two different variants.
In the embedded version the following script-code is missing:
<script>
setInterval(function (){jQuery.get("https://www.dialyse-online.de/index.php?option=com_chronoforms6&chronoform=mailform&tmpl=component "); 300000);
jQuery(document) .ready(function ($){$.G2.forms.invisible();
$ ('body'). on ('contentChange.form', 'form', function (e) {e.stopPropagation();
$.G2.forms.ready($(this));});
.$('Form')trigger ('contentchange');});
</ Script>
<script type = "text / javascript">
jQuery(document) .ready(function ($){$("div.G2-joomla")trigger ("contentchange.");});
</ Script>
In which file is the script inserted / where does it come from?
regards
Thomas
there is an essential difference in the html source of the two different variants.
In the embedded version the following script-code is missing:
<script>
setInterval(function (){jQuery.get("https://www.dialyse-online.de/index.php?option=com_chronoforms6&chronoform=mailform&tmpl=component "); 300000);
jQuery(document) .ready(function ($){$.G2.forms.invisible();
$ ('body'). on ('contentChange.form', 'form', function (e) {e.stopPropagation();
$.G2.forms.ready($(this));});
.$('Form')trigger ('contentchange');});
</ Script>
<script type = "text / javascript">
jQuery(document) .ready(function ($){$("div.G2-joomla")trigger ("contentchange.");});
</ Script>
In which file is the script inserted / where does it come from?
regards
Thomas
Hi Thomas,
Sorry, I have no idea where that script comes from. I did a search but did not locate it.
Bob
Sorry, I have no idea where that script comes from. I did a search but did not locate it.
Bob
Hi Bob,
So did i befor (with clean unzipped chronoform6 component) ...
Well then I will continue searching
anyway, thanks a lot
Thomas
And by the way: Chronoform is a great componente. Very usefull and comfortable.
So did i befor (with clean unzipped chronoform6 component) ...
Well then I will continue searching
anyway, thanks a lot
Thomas
And by the way: Chronoform is a great componente. Very usefull and comfortable.
Hi Thomas,
You can print the Chronoforms6 plugin syntax and then parse it to execute the plugin code: {chronoforms6}mailform{/chronoforms6}
Or you can use this line in your PHP code:
Best regards
You can print the Chronoforms6 plugin syntax and then parse it to execute the plugin code: {chronoforms6}mailform{/chronoforms6}
Or you can use this line in your PHP code:
file_get_contents("http://www.domain.com/index.php?option=com_chronofrom6&chronoform=mailform&tmpl=component");Best regards
Sorry, it's me again
"... works perfect!" was a little early :-(
I inserted the form via file_get_contents and the funtionality is well given on desktop PC but not on mobile devices (tablet, smartphone)
No hints for required fields and no calendar, ...
AND i did it the same way on an other page (same website) and it works on all devices?!?
Any ideas or suggestions
regards
Thomas
"... works perfect!" was a little early :-(
I inserted the form via file_get_contents and the funtionality is well given on desktop PC but not on mobile devices (tablet, smartphone)
No hints for required fields and no calendar, ...
AND i did it the same way on an other page (same website) and it works on all devices?!?
Any ideas or suggestions
regards
Thomas
Hi Thomas,
You may try the plugin workaround then and use PHP code to process the plugin syntax.
Best regards
You may try the plugin workaround then and use PHP code to process the plugin syntax.
$mainframe = \JFactory::getApplication();
$contentParams = \JComponentHelper::getParams('com_content');
$dispatcher = \JDispatcher::getInstance();
$type = 'content';
\JPluginHelper::importPlugin($type);
$context = '';
$rowPlg = new \stdClass();
$rowPlg->text = '{chronoforms6}form-alias{/chronoforms6}';
$results = $mainframe->triggerEvent('onContentPrepare', array($context, &$rowPlg, &$contentParams, 0));
echo $rowPlg->text;
Best regards
This topic is locked and no more replies can be posted.
