Hi,
i'm starting with ChronoForms and i have a problem with a drop-down list.
I can save the content of a form, i can reload it to display but the selected options in drop-down are not selected. Values are well saved int he database.
Is somebody can help me, please ?
Hi castagnier ,
Which version of ChronoForms are you using? How are you re-loading the form data?
Please post a link to the form so we can take a quick look.
Bob
Hi greyhead,
we are testing version 4 on joomla 1.5.23. It's impossible to put a link to the form because it's installed on a local server for internal use only (sorry for that).
To reload the data we based our form on the tutorial DB_MULTI_RECORD_LOADER.
All fields are filled on the screen except combo box with no option selected back.
Do we need to use some extra code to put attribute "selected"=selected ?
What do you need more ?
Hi castagnier,
Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.
I just looked in the code for the DB Record Loader and that 'should' correctly set the value for a drop-down select box.
Bob
Bob,
i took a look in this tutorial but i see anything about combobox. Could you give me the chapter number.
I have attached the zip file to this post
thanks to take some times
We found that the problem is because we used a multiple select combobox.
When we uncheck "multiple", combobox is working correctly.
Do you know how we can manage a multi-select combobox ?
thanks in advance
Hi castagnier,
I don't have time to debug now as I'm about to go away for a few days.
The code is in components/com_chronoforms/libraries/includes/data_republish.php around line 142. You'll see a block marked // multi select. I can only imagine that there is a bug in those lines somewhere :-(
Bob
Hi all
Castagnier - thanks for your hack to data_republish.php (I make it after line 164) : this does enable multiple selections in a select box to be shown.
I also want to populate a checkbox group with multiple selections - this doesn't currently work. The code block for checkboxes around line 111 is different to the select box one, and while I get the general gist I'm nervous of performing surgery here.
Can someone advise what to change and exactly where please ?
Bob / Max - I've also populated the DB Record Loader options for array field sets & array separators in the wizard edit, but these don't have any effect for either select box or checkbox group multiple selections. Do I need to do anything else ?
Thanks
Steve