Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Show field based on other field data

phpMyEdit General     Show field based on other field data
Post new topic   Reply to topic    
 
chrometop     Joined: 23 Sep 2010   Posts: 1  
Post Posted: 2010-09-23 15:36
Back to top  Reply with quote     

based on the data in this field:

$opts['fdd']['InputInUse'] = array(
'name' => 'INPUT IN USE',
'select' => 'T',
'maxlen' => 10,
'sort' => false,
'values' => array('INPUT 1', 'INPUT 2'),
'escape|LF' => false,
'sql|LF' => 'if(InputInUse = "INPUT 1", CONCAT("<img src=\"rtrimg/Input1.jpg\">"), CONCAT("<img src=\"rtrimg/Input2.jpg\">"))',
);

I want to show the Approriate field:

If INPUT 1 do this:

$opts['fdd']['CR0605'] = array(
'name' => 'INPUT 1 - CR0605',
'select' => 'T',
'maxlen' => 255,
'sort' => false,
// 'options' => 'LAVCPDF'
'values' => array(
'table' => MAX3,
'column' => 'ID',

'description'=> array( // this array describes the fields and dividers placed between them that will be displayed for this field in list and view etc. If ['options'] => 'R' is set, then it will only display if there is a match//
'columns' => array(
'0' => 'CROSS_POINT',
'1' => 'SOURCE',
),
'divs' => array(
'0' => ' - ',
),
),
)
);

else do this

$opts['fdd']['33OutSDX'] = array(
'name' => 'INPUT 2 - 33 OUT SDX',
'select' => 'T',
'maxlen' => 255,
'sort' => false,
'values' => array(
'table' => SDXDest,
'column' => 'ID',

'description'=> array( // this array describes the fields and dividers placed between them that will be displayed for this field in list and view etc. If ['options'] => 'R' is set, then it will only display if there is a match//
'columns' => array(
'0' => 'SDXDest',
'1' => 'SDXDesc',
),
'divs' => array(
'0' => ' - ',
),
),
)
);

I'm not sure of the correct sytax. Appreciate any help. Thanks.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy