I have multiple forms that will be using the same bit of javascript code.
I'd like to keep the javascript code in only one place.
Is there a way that I can have this common javascript code in one file and have that file included in each of the multiple different forms?
Hi,
Yes, by adding it to a file and uploading it to the server and including a reference to the file in your forms code.
I'm planning to have some solution to this issue and others by the new version.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks.
What's the best way for "including a reference to the file in your forms code."?
Hi edog5948,
The two snippets are more or less the same.
[list]
The isSite line is needed in ChronoForms to work around a problem with the way it evaluates code when the from is saved.
I use $doc just because it's less to type than $document.
I also use JURI::base(). to make sure that the URL is full and unambigous.[/list]
Bob