derrick1123 Posted April 13, 2011 Share Posted April 13, 2011 I'ts been bugging me for a few days, so I decided to try and get some help. function somestuff_ConfigOptions($params) { ini_set("soap.wsdl_cache_enabled", "0"); $rwsdl = "https://somesite"; $vwsdl = "https://somesite"; $rurl = "https://somesite"; $vurl = "https://somesite"; $rns = "somestuff"; $vns = "somestuff"; $apiuser=somestuff; $apikey=somestuff; $auth = array ( "username" => $apiuser, "apiKey" => $apikey ); $soapClient = new SoapClient($rwsdl, array("trace" => 1)); $oSoapVar= new SoapVar( $auth, SOAP_ENC_OBJECT); $oSoapHeader = new SoapHeader($rns, 'RequestCredentials', $oSoapVar); try { $info = $soapClient->__soapCall('locationList',array(), array(), $oSoapHeader); } catch (SoapFault $exception) { return $exception; } $locations=$info->{'locations'}; $lc = count($locations); $llist = ""; for($i=1;$i<$lc;$i++) { $llist .= $locations[$i]->{'locationId'}."|".str_replace(",",";",$locations[$i]->{'name'}).","; } $llist .= $locations[0]->{'locationId'}."|".str_replace(",",";",$locations[0]->{'name'}); $configarray = array( "Location" => array( "Type" => "dropdown", "Options" => $llist), ); return $configarray; } It works perfectly as a drop down, which allows me to choose the location I want in the back-end...but I want the users to be able to choose the location. I would need to be able to push it to Config Fields instead of Module Settings. 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.