lemmi
Založený: 23.06.2004
Príspevky: 9
Zaslal: 2004-06-29 19:20
Návrat hore
Odpovedať s citátom
|
I try to implement a multiple select from a look-up table, but with no success. Is't a configuration problem or a bug (latest CVS version)??
Here the code:
Kód: |
$opts['fdd']['Comp_Category'] = array(
'name' => 'Cat.',
'select' => 'M',
'maxlen' => '50',
'options' => 'LVACP',
'sort' => true
);
$opts['fdd']['Comp_Category']['values']['table'] = 'tblcompany_section';
$opts['fdd']['Comp_Category']['values']['column'] = 'Cat_ID';
$opts['fdd']['Comp_Category']['values']['description'] = 'Name';
|
I always get a standard select box on an the Add/Change screen but a multiple select for filtering.
What is wrong?
Thanks for help!!!
|
lemmi
Založený: 23.06.2004
Príspevky: 9
Zaslal: 2004-06-30 09:43
Návrat hore
Odpovedať s citátom
|
Problem resolved!!
I have just added following code to function recreate_displayed() as proposed by hbernard:
Kód: |
//<hbernard - Line 2650 - add this lines to make 'M'ultiple work with ['values']['table']
if ($this->fdd[$key]['select'] == 'M' && isset($this->fdd[$key]['values']['table'])) {
$this->connect(); //connection to mysql, required for set_values_from....
$this->fdd[$key]['values2'] = (array)$this->fdd[$key]['values2']
+ (array)$this->set_values_from_table($key);
unset($this->fdd[$key]['values']); //useless values
}
//>hbernard
|
That's all. It works as expected.
|
fgalian
Založený: 08.07.2009
Príspevky: 2
Zaslal: 2009-07-08 08:50
Návrat hore
Odpovedať s citátom
|
Hello, it seems that line 2650 reffers to an older source code. Could you please let me know where should I insert this code and if it still works with phpMyEdit/phpMyEdit.class.php,v 1.204 2007-09-16 12:57:07 ?? thanks in advance,
Franco
lemmi Napísal: |
Problem resolved!!
I have just added following code to function recreate_displayed() as proposed by hbernard:
Kód: |
//<hbernard - Line 2650 - add this lines to make 'M'ultiple work with ['values']['table']
if ($this->fdd[$key]['select'] == 'M' && isset($this->fdd[$key]['values']['table'])) {
$this->connect(); //connection to mysql, required for set_values_from....
$this->fdd[$key]['values2'] = (array)$this->fdd[$key]['values2']
+ (array)$this->set_values_from_table($key);
unset($this->fdd[$key]['values']); //useless values
}
//>hbernard
|
That's all. It works as expected. |
|
JammerPro
Založený: 07.12.2006
Príspevky: 33
Zaslal: 2009-10-02 22:31
Návrat hore
Odpovedať s citátom
|
fgalian Napísal: |
Hello, it seems that line 2650 reffers to an older source code. Could you please let me know where should I insert this code and if it still works with phpMyEdit/phpMyEdit.class.php,v 1.204 2007-09-16 12:57:07 ?? thanks in advance,
Franco
lemmi Napísal: |
Problem resolved!!
I have just added following code to function recreate_displayed() as proposed by hbernard:
Kód: |
//<hbernard - Line 2650 - add this lines to make 'M'ultiple work with ['values']['table']
if ($this->fdd[$key]['select'] == 'M' && isset($this->fdd[$key]['values']['table'])) {
$this->connect(); //connection to mysql, required for set_values_from....
$this->fdd[$key]['values2'] = (array)$this->fdd[$key]['values2']
+ (array)$this->set_values_from_table($key);
unset($this->fdd[$key]['values']); //useless values
}
//>hbernard
|
That's all. It works as expected. |
|
It works in 5.7.1 perfectly!
Insert the above code at Line 2980. Here's where:
Kód: |
if (is_array(@$this->fdd[$key]['values']) && ! isset($this->fdd[$key]['values']['table'])) {
foreach ($this->fdd[$key]['values'] as $val) {
$this->fdd[$key]['values2'][$val] = $val;
}
unset($this->fdd[$key]['values']);
}
// [b]THIS IS LINE 2980 in Version 5.7.1 - Put the above code here!!!!![/b] Like this:
//<hbernard - Line 2650 - add this lines to make 'M'ultiple work with ['values']['table']
if ($this->fdd[$key]['select'] == 'M' && isset($this->fdd[$key]['values']['table'])) {
$this->connect(); //connection to mysql, required for set_values_from....
$this->fdd[$key]['values2'] = (array)$this->fdd[$key]['values2']
+ (array)$this->set_values_from_table($key);
unset($this->fdd[$key]['values']); //useless values
}
//>hbernard
isset($this->fdd[$key]['help']) && $this->guidance = true;
$this->fdd[$field_num] = $this->fdd[$key];
$field_num++; |
|
sbuelow
Založený: 10.07.2009
Príspevky: 6
Zaslal: 2011-01-10 11:31
Návrat hore
Odpovedať s citátom
|
Hello there
Just had the same issue and applied the patch as suggested by hbernard on 5.7.1.
There's still a flaw tough.
Look like data is saved correctly, but when I edit the record, previously selected values don't get highlighted again.
The same doesn't happen with 5.6 release.
Anybody knows where to look for ?
Thanks
|
ddgiants
Založený: 15.12.2011
Príspevky: 1
Zaslal: 2011-12-15 23:18
Návrat hore
Odpovedať s citátom
|
I know this is old but just for any Googlers like me.
For 5.7.1 add above aforementioned code after line 2979.
However, to get it to choose previous selected items in update mode, you need to change this line at line 1539
foreach($selected as $val) $selecte2[]=(string)$val;
to this
foreach($selected as $val) $selected2[]=(string)$val;
Notice the missing d. All works great now, Thanks forum.
DD
sbuelow Napísal: |
Hello there
Just had the same issue and applied the patch as suggested by hbernard on 5.7.1.
There's still a flaw tough.
Look like data is saved correctly, but when I edit the record, previously selected values don't get highlighted again.
The same doesn't happen with 5.6 release.
Anybody knows where to look for ?
Thanks |
|
Jacqueline
Založený: 16.01.2015
Príspevky: 1
Zaslal: 2015-01-16 08:57
Návrat hore
Odpovedať s citátom
|
Any way I can make it so that the user can select how many rows to display in the list?
___________
hiba
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2015-01-16 16:06
Návrat hore
Odpovedať s citátom
|
http://hockinson.us/txt/num_recs.txt
|
jacobhue
Založený: 24.02.2022
Príspevky: 46
Zaslal: 2022-05-27 13:02
Návrat hore
Odpovedať s citátom
|
Your writing is really informative, especially because it's so meaningful and updated. Thanks for sharing this wonderful post!
tcswebmail
upsers
prepaidgiftbalance
|
danverseak2
Založený: 07.09.2022
Príspevky: 62
Zaslal: 2022-09-07 10:19
Návrat hore
Odpovedať s citátom
|
They can expertly guide you through the entire process.
Granite Bay Fence Company
|
robinjack
Založený: 01.03.2021
Príspevky: 7259
Zaslal: 2022-09-16 14:02
Návrat hore
Odpovedať s citátom
|
baby strollers with high traction rollers should be much safer to use compared to those with plastic wheels-
gudanglagu123
|
robinjack
Založený: 01.03.2021
Príspevky: 7259
Zaslal: 2022-09-18 16:04
Návrat hore
Odpovedať s citátom
|
I agree with most of your points, but a few need to be discussed further, I will hold a small talk with my partners and maybe I will look for you some suggestion soon.
Amarose
|
topboosterseo
Založený: 24.07.2022
Príspevky: 4504
Zaslal: 2022-09-25 11:31
Návrat hore
Odpovedať s citátom
|
There are a couple of fascinating points with time on this page but I don’t know if these center to heart. There’s some validity but Let me take hold opinion until I look into it further. Great post , thanks and then we want a lot more! Combined with FeedBurner too
Diaetoxil
|
robinjack
Založený: 01.03.2021
Príspevky: 7259
Zaslal: 2022-09-27 16:07
Návrat hore
Odpovedať s citátom
|
Youre so cool! I dont suppose Ive read anything in this way just before. So nice to get somebody with a few original thoughts on this subject. realy appreciation for beginning this up. this web site is something that is needed on the net, a person with some originality. helpful problem for bringing a new challenge towards web!
Protetox
|
topboosterseo
Založený: 24.07.2022
Príspevky: 4504
Zaslal: 2022-09-28 06:14
Návrat hore
Odpovedať s citátom
|
You made some decent points there. I looked on the net for your problem and located most people goes together with along with your internet site.
Heater Pro X
|
Odoslať novú tému
Odpovedať na tému
Choď na stránku 1, 2, 3, 4, 5, 6, 7, 8 Ďalší
|