I love Chronoforms and use it for a lot of my work. As my forms usually have a great deal of code both in the html form code and in custom code snippets in the wizard, I am forever copying and pasting from my text editor of choice (notepad++) into the code/custom code windows. The size of the text areas and lack of code formatting means that it's impractical to do any inspection of the code within Chronoforms.
If I were using FTP to edit files within Joomla, I have notepad++ with an ftp plug-in so that I can edit and save and the change take effect immediately. I realise that with chronoforms I am actually editing database fields rather than files, but I wondered if anyone had any tricks for streamlining things. Even if it's a hassle to set up, it would make my time using chronoforms a lot more enjoyable.
Any ideas? Am I missing something obvious I wonder?
Cheers
Andy
If I were using FTP to edit files within Joomla, I have notepad++ with an ftp plug-in so that I can edit and save and the change take effect immediately. I realise that with chronoforms I am actually editing database fields rather than files, but I wondered if anyone had any tricks for streamlining things. Even if it's a hassle to set up, it would make my time using chronoforms a lot more enjoyable.
Any ideas? Am I missing something obvious I wonder?
Cheers
Andy
Hi Andy,
I use includes all the time - much easier than working in the fiddly text boxes. You can do it with any box that accepts PHP - which is almost all of them. I set up an include almost automatically when there is more than half-a-dozen lines of code.
It also means that once the form is saved I can edit and re-upload the included file without having to save the form element or action and re-save the form. Just refreshing the front-end form page is enough.
I have a macros set up to paste this code into the ChronoForms box
Then I add the includes/form_name folder (see the path in the code snippet) and add the file content there.
My current editor of choice is Sublime Text 2 with the SFTP/FTP addon and this works incredibly well with ChronoForms on my test sites and on client sites. This has built in prettifiers and validators that make working with PHP and JavaScript in particular a great delight compared with the CF textareas.
I mostly include using the Custom Element element for HTML, the Custom Code action for PHP, the Load JS action, the Load CSS action, and the Email Template.
Bob
I use includes all the time - much easier than working in the fiddly text boxes. You can do it with any box that accepts PHP - which is almost all of them. I set up an include almost automatically when there is more than half-a-dozen lines of code.
It also means that once the form is saved I can edit and re-upload the included file without having to save the form element or action and re-save the form. Just refreshing the front-end form page is enough.
I have a macros set up to paste this code into the ChronoForms box
<?php
include (JPATH_SITE.DS.'components'.DS.'com_chronoforms'.DS.'includes'.DS.$form->form_details->name.DS.'load_js.js');
?>
(change the file name to suit).Then I add the includes/form_name folder (see the path in the code snippet) and add the file content there.
My current editor of choice is Sublime Text 2 with the SFTP/FTP addon and this works incredibly well with ChronoForms on my test sites and on client sites. This has built in prettifiers and validators that make working with PHP and JavaScript in particular a great delight compared with the CF textareas.
I mostly include using the Custom Element element for HTML, the Custom Code action for PHP, the Load JS action, the Load CSS action, and the Email Template.
Bob
As usual, your approach makes perfect sense Greyhead. I'll adopt your method from here on in. If only I could get back all those hours of copying and pasting.
I'll check out sublime text also, I'm perfectly happy with notepad++, but it's good to see what else is on offer.
Thank you.
I'll check out sublime text also, I'm perfectly happy with notepad++, but it's good to see what else is on offer.
Thank you.
This topic is locked and no more replies can be posted.