Hi everyone, I've set up an app with a 'category' field in it. I'm creating an item in my app using the API using the following code...
$how_int = 1;
$how_int = 2;
$how_int = 3;
$how_int = 4;
$how_int = 5;
$how_int = 6;
$fields_array = array();
$fields_array['name'] = $_POST['name'];
$fields_array['email-address'] = $_POST['email'];
$fields_array['telephone-number'] = $_POST['telephone'];
$fields_array['how-did-you-hear-about-us'] = $how_int;
$fields_array['date-received'] = array('start' => $date, 'end' => $date);
$fields_array['message'] = $_POST['feedback'];
array('fields' => $fields_array),
$options = array()
Mostly it works, however I've had to change the order of the categories and the integer value assigned to them doesn't seem to have changed, for example if I send 3 through as the integer value for the category I would expect the category to be 'existing customer' but it isn't it's being set as 'email'.
Is there a way to explicitly set the integer values of the categories? Or have I missed/misunderstood something?
Please sign in to leave a comment.