Jump to content


Approved members
  • Content Count

  • Joined

  • Last visited

  1. alopama

    pick list

    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.
  2. alopama

    pick list

    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.
  • Create New...