alopama Posted August 31, 2016 Report Share Posted August 31, 2016 Hi, i am very new to PEAR PHP. And suddenly got work on it. i dont have much information on how PEAR PHP works or its coding but i have given a task to complete this. Can anyone please help me on this. i will be greatful i have already done inserting single entry but not able to see the selected entry when i click on existing banner. Please help me out. Quote Link to comment Share on other sites More sharing options...
Ian Posted September 1, 2016 Report Share Posted September 1, 2016 Hmm, maybe you could explain a bit more thorough on what you are doing, and what you exactly want as result. I'm not sure anyone is able to help with the amount of information you have provided. Quote Link to comment Share on other sites More sharing options...
alopama Posted September 6, 2016 Author Report Share Posted September 6, 2016 hi, this is the code which i have written in banner-edit.php file for picklist( i.e two dropdown box with add and remove button) $renderer =& $form->defaultRenderer(); $renderer->setElementTemplate($withoutLabel,'send'); if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) { $form->addElement('header', 'header_additional', $GLOBALS['strAccesspoint']); $dropdown = array(); $dropdown[0] =& HTML_QuickForm::createElement('select','accesspoint',null,''); $dropdown[0]->setSize(10); $doAccesspoint = OA_Dal::factoryDAL('accesspoint'); $accesspointList = $doAccesspoint->getAccesspointList(); foreach ($accesspointList as $accesspoint){ $dropdown[0]->addOption($accesspoint['ap_name_mac_id'] , $accesspoint['accesspoint_id'] , null); } $dropdown[1] =& HTML_QuickForm::createElement('button',null,$GLOBALS['strAdd'],array('id' => 'add-accesspoint','name'=>'add-button')); $dropdown[2] =& HTML_QuickForm::createElement('button',null,$GLOBALS['strRemove'],array('id' => 'remove-accesspoint'),' '); $dropdown[3] =& HTML_QuickForm::createElement('select','accesspoint_id',null,''); $dropdown[3]->setSize(10); $form->addGroup($dropdown, 'dropdown',$GLOBALS['strAccesspoint'], ' '); And this is the another part of code which i have written in banner-edit.html file $(document).ready(function(){ $('#add-accesspoint').click(function() { return !$('#accesspoint option:selected').remove().appendTo('#accesspoint_id'); }); $('#remove-accesspoint').click(function() { return !$('#accesspoint_id option:selected').remove().appendTo('#accesspoint'); }); }); using the above code i m selecting the value from dropdown[0] and adding it to dropdown[3]. i m able to insert the data of dropdown[3] while submitting the new banner in banner table .But while editing the existing banner i m not able to fetch the dropdown[3] value from the banner table. Help me out at editing part. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.