Chronoform V4- drop down box

simelas 22 Sep, 2013
maybe a bug or a miss configuration ?
Drop down box does not expand horizontally to show full text when multiple choice is activated. Use of standard drop down box, no custon code.
Single choice drop down expands laterally to accomodate with text wide (and expands vertically too).
Any idea for the reason ? I suspect that when size if set to more than 1 it blocks both expansions (horizontal and vertical).
GreyHead 23 Sep, 2013
Hi simelas,

I believe that is a browser feature - you can either make the options shorter or increase the width of the select drop-down to allow for the longer text.

simelas 28 Sep, 2013
Hi Bob,

thanks for your answer. Tried several options and browsers( my "standard" is firefox); but still the same issue. Indeed quite easy to change width of the window via css, but i dont' understandd why in single selection mode, the select dropdown box autmatically increases its width to accomodate text lenght and does not behave the same when in multiple selection mode ... ! any idea ?
GreyHead 29 Sep, 2013
Hi simelas,

It's the way that the browsers are written - nothing directly to do with ChronoForms :-(

There are some solutions/workarounds in this StackOverFlow post.

simelas 29 Sep, 2013
Hi Bob,

now i understand !

Thanks for your swift answer.

simelas 08 Oct, 2013
Hi Bob

maybe a silly question: Multilanguage form: how do you select a language in multi record loader linked to a drop down box ? or better said how do you tell to the multi record loader to load only the right values linked to a given language ? any specific syntax ?

GreyHead 08 Oct, 2013
Hi simelas,

It does depend on how the language is recorded in the database table of course! YOu can get the current language with code like this:
$lang =& JFactory::getLanguage();
$form->data['lang_tag'] = $lang->getTag();
This will add the current language tag e.g. en-GB to the $form->data array so that you can use it in another action.

enriture 12 Mar, 2014
Hi GreyHead,
I'm sorry if I resume an old topic, but I've got the same issue and I'm not good at all with PHP.
Could you please explain a little bit more in depth how (and where) to use the code you posted, in order to load the right values from the database, depending on the language used?
Thank you in advance.

GreyHead 26 Mar, 2014
Hi enriture,

There isn't a general answer - how do you have the language encoded in your database tables?

simelas 28 Jul, 2014
Hi Greyhead,

i am not sure to have seen something about drop down and blank value and 0 (null). Appearently when using 0 (null value) to be selected such as ' 0=something to select' in drop down box; show empty value is ignored and 0 (null) is selected as default value. I have tried several ways and even via custom code but still 0 selected which creates some issue in one form in development. Something done wrong ? Is there a turnaround ?
Best regards,
GreyHead 28 Jul, 2014
Hi simelas,

I think that the answer is not to use a Null value in the options. If you need a null value, then put something else in there like null=something to select and convert the result back in a Custom Code action in the On Submit event.

simelas 28 Jul, 2014
Hi Bob,
i had tried this option too. But issue is that selector returns to initial state ( blank) on a loop event instead of keeping selected value. There are 6 selectors in the form, out of which 5 performs as expected...
I 'll think a little bit further and any hint is welcome. (i am sticking on the 0 / 1 values as this is for published unpublished...and a little bit too far away in the work for changing several forms.. but maybe i'll have to...)

Phil S
GreyHead 29 Jul, 2014
Hi Phil,

I'm off to London for a couple of days but if you post a form backup here (as a zip file) then I'll have a look when I get back to my desk again.

simelas 29 Jul, 2014
Hi Bob,

et voila

GreyHead 20 Aug, 2014
Hi Phil,

Sorry for the delay in getting back to you. I finally found time to test your form (and then found it wouldn't work with out the DB Tables).

There's a bug somewhere in the code that saves the HTML - if you look at the form Code tab you will see that the 0 option in the select drop-down HTML includes the selected attribute. At least that's what I found with a test form. Then when no value is specified it falls back to this selection.

As a workaround it seems to work if you change the value of the option from 0 to 00 (that's two zeros). I have no real idea why but with that in place the reload shows the correct value.

simelas 20 Aug, 2014
HI Bob,

the double 00 works fine . ( Question is maybe why !... but it works ...)

Thanks for the hint.

Time for a beer now .


This topic is locked and no more replies can be posted.