Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: October 27, 2017

Hi Zicky, 

The first thing you want to do is add some debug code to see what variables you have to work with.  Try: 

showme($_REQUEST);
exit;

If new_category is a number you'll have to load the label manually.  Check out the function getListOptionsFromSchema().  You can pass it a fieldSchema to get the values for that field, eg: (untested code)

$fieldSchema    = $GLOBALS['schema']['news_category'];
$valuesToLabels = getListOptionsFromSchema(fieldSchema);
$fieldLabel     = @$valuesToLabels[ @$_REQUEST['news_category'] ];

But you'll want to use showme() on the different variables if it doesn't work at first try to see what data you're getting.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com