close();?>This is my website with the problemHelp me please..."> Problem with Double DropDown - Forums

Forums

Problem with Double DropDown

napster89 26 Jun, 2014
Hi,
I am David from Italy.
I have some problem with create a Double DropDown.
I have follow the guide at http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2647-how-do-i-build-a-select-drop-down-radio-button-or-checkbox-group.html
But i don't understand where is my problem.
This is my Configuration on ChronoForm:

Database Name:
jos_DATA
Database Field:
Regione,Provincia,Comune,Data1,Data2,Data2
------------------------------------------
FORM WIZARD:
First Field

- General:
Label Text: Provincia
Filed Name: input1
Field ID: input1

- Dynamic Data:
Enable: Yes
Data Path: DATA
Value Key: Provincia
Text Key: Provincia

Second Field

-General:
Label Text: Comune
Filed Name: input2
Field ID: input2
------------------------------------------
EVENTS:
On Load
- DB Multi Record Loader
-- Basic:
DB Field: DATA
Table: jos_DATA
Model ID: DATA
Fields: Provincia,Comune

- Dynamic Dropdown
-- Settings:
Action Label: test1
Source Dropdown ID: input1
Target Dropdown ID: input2
Use AJAX? Yes
AJAX Event name: ajax
Extra options extension: x

- Show html

On ajax (New Event)
- DB Multi Record Loader
-- Basic:
DB Field: Comune
Table: jos_DATA
Request Param: Provincia
Model ID: DATA2
Fields: Provincia,Comune

- Custom Code
Mode: Controller
Action Label: test1
Code:

<?php
$results = array();
$results[] = '=??';
foreach ( $form->data['DATA2'] as $v ) {
  $results[] = $v['Provincia'].'='.$v['Comune'];
}
$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();
?>


This is my website with the problem
Help me please...
napster89 27 Jun, 2014
I have Solved my problem:
I have change this:

On ajax (New Event)
- DB Multi Record Loader
-- Basic:
DB Field: Provincia
Table: jos_DATA
Request Param: input1
Model ID: DATA2
Fields: Provincia,Comune

and the code is:

<?php
$results = array();
$results[] = '=-';
foreach ( $form->data['DATA2'] as $v ) {
  $results[] = $v['Provincia'].'='.$v['Comune'];
}
$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();
?>


But now I have another problem,
Once I have given the "Comune" date, I wish that through a similar function "Dynamic Dropdown", fill in a Text Area (the procedure I would like in the Wizard).
Is it possible?
This topic is locked and no more replies can be posted.