Api not catching extra attribues while adding Participants

More
6 months 1 week ago #154949 by navt3k
navt3k created the topic: Api not catching extra attribues while adding Participants
Hi,

I am working for a client and they have installed your system. They hired me for api development.

My problem is while adding participants the user want to add extra attributes too but when I am sending that data to api it's not catching it.

Here is my code (i ve tried ea_1 also attribute_1 but none workes)

$Participants=array(array("email" => "$_REQUEST" , "firstname" => "$_REQUEST[fname]" , "lastname" => "$_REQUEST[lname]", "attribute_1" => "+919000000000" )); $add_participant_result=$myJSONRPCClient->cpd_importParticipants($sessionKey,$Participants); print_r($add_participant_result); could you please assist for it. Best Regards, Navin navt3k@gmail.com[email]" , "firstname" => "$_REQUEST[fname]" , "lastname" => "$_REQUEST[lname]", "attribute_1" => "+919000000000" ));
$add_participant_result=$myJSONRPCClient->cpd_importParticipants($sessionKey,$Participants);
print_r($add_participant_result);

could you please assist for it.

Best Regards,
Navin
This email address is being protected from spambots. You need JavaScript enabled to view it.
Attachments:

Please Log in to join the conversation.

More
6 months 1 week ago #154959 by LouisGac
LouisGac replied the topic: Api not catching extra attribues while adding Participants
Here the code for cpd_importParticipants():
github.com/LimeSurvey/LimeSurvey/blob/ma...ndle.php#L2663-L2783

Please Log in to join the conversation.

More
6 months 1 week ago #154964 by navt3k
navt3k replied the topic: Api not catching extra attribues while adding Participants
Thanks for your reply.. but sadly the code says...

$aData = array(
'firstname' => $aParticipantData,
'lastname' => $aParticipantData,
'email' => $aParticipantData,
'owner_uid' => Yii::app()->session, // ToDo is this working?
);

so they aren't processing any extra attribute in the method moreover these extra attributes are not the part of the participant table, these are stored in another table (participant_attribute) with a reference set to the (participants) with `participant_id`

what are your thoughts around that ?

Please Log in to join the conversation.

More
5 months 2 weeks ago #155664 by DenisChenu
DenisChenu replied the topic: Api not catching extra attribues while adding Participants
We are happy to see good merge request for improving LimeSurvey .

Your client hiring you, not us.

But here : you don't have good eyes : system seems to be here : github.com/LimeSurvey/LimeSurvey/blob/96...rol_handle.php#L2901

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LouisGac

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!