Home » RADICORE development » Framework » DropDown Field values - changing in runtime
Re: DropDown Field values - changing in runtime [message #7697 is a reply to message #7696] |
Fri, 11 March 2022 09:53 |
htManager
Messages: 439 Registered: May 2014
|
Senior Member |
|
|
I split the compound key into its component parts in _cm_updateFieldArray() with the following code:
$str_gr_art = $postarray['gr_art_dropdown'];
if (isset($postarray['gr_art_dropdown'])) {
$gr_key_array = explode('&', $str_gr_art);
// weist die Daten $GLOBALS zu
$GLOBALS['gr_key_array'] = $gr_key_array;
// liest die Schlüsselwerte der ausgewählten Größe ein
$fieldarray['gr_art'] = $gr_key_array[1];
$fieldarray['gr_art_sub'] = $gr_key_array[2];
$fieldarray['gr_art_rdc'] = $gr_key_array[3];
// ermittelt die Größen-Werte aus orga_groessen_ausr_detail
$dbobject =& RDCsingleton::getInstance('orga_groessen_ausr_detail'); // Instanz für Lookup-Tabelle
$dbobject->sql_select = 'gr_art_ausr, argroesse_desc';
$where = "gr_art='{$fieldarray['gr_art']}' AND " .
"gr_art_sub='{$fieldarray['gr_art_sub']}' AND " .
"rdcaccount_id='{$fieldarray['gr_art_rdc']}'";
// sortiert die Daten
$dbobject->sql_orderby = 'argroesse_desc';
$data = $dbobject->getData ($where);
// weist die Werte der Lookup-Variablen zu
foreach ($data as $row => $rowdata) {
$rowvalues = array_values($rowdata);
$array[$rowvalues[0]] = $rowvalues[0] . ' - ' . $rowvalues[1];
} // foreach
}
But the code is in my opinion not the problem. The numeric field has the same behaviour even if I set the above code in /* */
If I change the value of the numeric field before changing the dropdown field from 50,00 to 50,0, the numeric field will be increased to 500,00. If I change the value to 5 the value will not be increased but changed to 5,00. 5,0000 will be changed to 50.0000,00 and so on.
Changing the value of the numeric field to 5.00 (. instead of ,) increases the value by the factor of 100 and so on..
If I delete the code "$this->fieldspec['gr_art_dropdown']['javascript'] = array('onchange' => 'this.form.submit();');" in _cm_changeConfig(), nothing happens, the numeric field doesn't change the value.
[Updated on: Sat, 12 March 2022 09:18] Report message to a moderator
|
|
|
|
|
DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Sat, 12 February 2022 04:22
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Tue, 15 February 2022 07:09
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Thu, 17 February 2022 04:28
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Sat, 19 February 2022 04:56
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Sun, 06 March 2022 04:57
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Wed, 09 March 2022 04:36
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Fri, 11 March 2022 06:03
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Mon, 14 March 2022 05:41
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Wed, 16 March 2022 05:48
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Thu, 24 March 2022 06:54
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Fri, 25 March 2022 06:48
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Sat, 26 March 2022 06:18
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Fri, 01 April 2022 09:59
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Sun, 10 April 2022 03:17
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Wed, 13 April 2022 04:47
|
|
|
Re: DropDown Field values - changing in runtime
|
|
|
Re: DropDown Field values - changing in runtime
By: AJM on Wed, 13 November 2024 05:07
|
Goto Forum:
Current Time: Thu Nov 28 05:47:54 EST 2024
Total time taken to generate the page: 0.01512 seconds
|