Hi everybody,
I have an issue with a form containing in the onLoad event both db record loader and multi record db loader actions.
I need the form to contain both the db loaders because some of the values stored in the record I need to edit must be chosen from closed lists that are stored in some of my db tables.
Unfortunately, when a "link" the select box to the model id defined in the multirecord db loader something goes wrong, and when i click "frontend view" for the form I see the form as in the screenshot attached. I tried to add a Debugger action, but nothing changed.
I also attach my db loader, multi record db loader and select box configuration.
I really can't understand which is the error, can anybody help me?
Hi Federica,
Please check that you have the latest version of ChronoForms as Max has removed that options from the DB Record Loader to fix this bug.
Bob
Hi Bob,
thank you for your suggestion. I tried to install the latest version (4.0 RC3.4.1) on the one I had (4.0 RC3.21), and I also tried to remove the old one and install the latest, but everytime, when I access the form wizard, I see it in a strange format (different form what I see if I install the new version in a different site), and I'm not able to use some of the new features.
Have you any idea about why does it happen?
Thank you,
Federica
Hi Federica,
Sorry, I've no real idea. Please try clearing your browser cache in case some old scripts are still there and/or logging in and out of the Site Admin to clear the session.
Bob
Hi Bob,
I tried but nothing changed....I also noticed that I see something different depending on the browser I'm using...anyhow, it doesn't matter, the "old" version is working disabling load fields/curly replacer in the record loader, for me it's ok 🙂.
Now I just need to manage changing on some of the values: can I do this with or should I use something different?
Thanks,
Federica
Hi Bob,
you're right, I wasn't clear, sorry! I need to change the value list of one select box (populated using multi record db loader) depending on the value selected in another of my select boxes. The tables that feed my select box are linked. I guess I need to use some ajax code, and I was wondering if I can add this logic to the select boxes I defined or if I had to use different element/actions.
Thank you!
Federica
Hi Federica,
That's what we call a double drop-down. One select drop-down linked to another. There's a Dynamic Drop-Down action in the CFV4 Power Fields action group to help you do this.
Bob
Hi Bob,
thank you, I tried to use the dynamic dropdown: I configured the action and added a new event (named ajax_ddl) where I put php custom code, but when I changed the selected value in the "master" drop down nothing happens. I'm not sure I understood correctly how the event output should be formatted: do I have to write down an output list or a list of value=text string?
Here's the code I'm using: I tried to put it in a custom code to check it, and it works fine.
I also attach a screenshot of the dynamic dropdown configuration:
<?php
$mainframe =&JFactory::getApplication();
$regione=&JRequest::getVar('regione','0');
$db=&JFactory::getDBO();
$sql="select * from `ana.provincia` where `ana.provincia`.`ana.regione_idRegione`=(select `idRegione` from `ana.regione` where `Regione` = '" . $regione . "')";
$db->setQuery( $sql );
$province=db->loadObjectList();
foreach($province as $provincia)
{
echo($provincia->Provincia . "=" . $provincia->Provincia . "<br/>");
}
$mainframe->close();
?>
I can't figure out what's wrong...😟
Thank you,
Federica