Buy Now
Sign in

how to disable on Chronoforms Formbehavior.chosen

bubila , January 20 2017
B
bubila
Hi there,I'm back again with a new question, I've bought a template and it uses this Formbehavior Chosen script that overrides the CF code. I have a form that loads a dynamic drop down and as this Chosen script is active, the code is not working at all.

Do you have any suggestion on how can I disable this script on the forms created with CF?
Long story short, this script adds elements to the form like this:
<div class="chzn-container chzn-container-single" style="width: 167px;" title="" id="from_chzn"><a class="chzn-single" tabindex="-1">

I guess I cuould comment the line JHtml::_('formbehavior.chosen', 'select'); but I do not actually know where to do it since I'm not sure where chronoforms is loaded in the Joomla files. Hope I made it clear, I'm not sure I explained it correctly!

By renaming the file chosen.php and ajaxchosen.php in the folder layouts->joomla->html->formbehavior the form works properly, but there are some issues in the admin panel (i.e. tabs in the module admin configuration won't load).
Thanks!
elisa
GreyHead
HI elisa,

I've no idea - I suggest that you check the template options or ask the template provider. ChronoForms does not load Chosen unless you deliberately add it to your form code.

I saw a similar problem on another site recently where it seemed to be enough to make the drop-down wider so that the options texts were still visible.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
B
bubila
HI Bob, unfortunately I've already asked them and they told me they won't offer support for third party plugins (it's really unbelievable!! since the problem is created by their template) I'm gonna try something else, I guess that somewhere this script has to called.. and I hope I'm gonna find where
elisa
B
bubila
If anyone else encounter the same problem.... here is the solution:
comment JHtml::_('formbehavior.chosen', 'select');
in the file include.php inside yourtemplate->includes

Hope this may help!
elisa
GreyHead
Hi Elisa,

Well found - thank you for letting us know :-)

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much