Extra fields not urldecoded
Message
 

I wrote a PHP script that calls the URL API's update_candidate through cURL to set some custom fields that I defined (extra_fieldXXXXX, where XXXXX are the appropriate field identifiers that I've already gathered).

I've submitted the values for these fields several ways (plain text, urlencode, htmlspecialchars), and from what I can tell, the API is not decoding the field values properly from the URL. When the extra fields are viewed in CATSONE, I see values like:

I+like+to+watch+turtles (The plus signs remain when spaces should be substituted)

http%3A%2F%2Fwww.linkedin.com%2Fin%2Falfredjones (hex isn't turned back into ASCII characters)

Note that when I submit the candidate via an add_candidate call, the standard CATSONE fields are handled just fine. For example, the candidate's address field shows actual spaces, and not plus signs.

Here's a snippet of my code:

curl_setopt($ch, CURLOPT_URL, 'http://blahblah.catsone.com/api/update_candidate');
curl_setopt ($ch, CURLOPT_POST, 1);

$post_fields = "transaction_code=".$transactionID; // the variables below are defined above - not important.
$post_fields .="&id=".$candidateID;
$post_fields .="&".$edufield."=".($edu); // also tried urlencode($edu), htmlspecialchars($edu)
$post_fields .="&".$linkedinfield."=".($linkedin);

curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_exec ($ch);

Thanks for any help.

Matt

 

Would really love some help with this. Thanks!

 
The poster of the following message is an official representative of CATS.

This should now be fixed.

 

Thanks for the quick response. Most of the fields are working. There still is a remaining problem: I had a custom drop-down field that was added using update_candidate, and the spaces still show up as plus signs (+) in the drop-down field.

Strangely, on regular free form text fields, the text that includes spaced sent via update_candidate is showing up just fine. Only in the drop-down field are the plus signs remaining in the contact record.

Thanks again for your continued help.

 

Any update? Can you take a look at the drop-down field decoding? Thanks much!!

 
The poster of the following message is an official representative of CATS.

Alright, I think I have this fixed. Could you give it a shot and see if it works as expected?

 

Alright - that seems to have worked. Thanks!
--


Login to post new content in the forum