timnboys Posted September 12, 2016 Report Posted September 12, 2016 Help Please! Need to know how to get the attribute from a fieldSelect field to process a vps id What in a nutshell I need to know is how to extract when running addService() function the actual id of the selected item in a fieldSelect box $planid = $fields->label(Language::_("demo.planid", true), "planid"); $planid->attach($fields->fieldSelect("planid", $plansall, array(), $plansallID, array()), array('id' => "planid")); $fields->setField($planid); ^ that is my specific field I am trying to do(mockup of it) and when the addService() function runs inside my provisioning module I want to be able to grab the id in $plansallID and match it with $plansall(the "friendly name" of the actual id I am looking for like for example instead of "12" it would be "centos 6") what I am trying to do is basically get the actual id out that goes with the selected item and then use that to run the api call to actually provision the vps. and I just don't know how to do it even though I have tried many ways already jobplease 1 Quote
Blesta Addons Posted September 12, 2016 Report Posted September 12, 2016 Use Array index to identify the selected option . Or try to build you own array index/key from a private function then call the same function in addservice to odentify the selected option . PauloV 1 Quote
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.