Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : add_participants remote control api

add_participants remote control api il y a 5 mois 11 heures #101670

  • muhzak
  • Portrait de muhzak
  • Hors ligne
  • Fresh Lemon
  • Messages : 5
  • Karma: 0
Hi,

So I can get information from lime. But when adding a token I use the following code:
$pData = array('firstname'=>"testFirst", 'lastname'=>'testLasy',"email"=>"fake@gmail.com");
$addParticipant = $myJSONRPCClient-add_participants($sessionKey,$survey_id,$pData );

It adds a token... that is an entry is made, and a unique token is generated. BUT the firstname, lastname and email are not added. I get the following return:
Array
(
    [firstname] => 
    [lastname] => 
    [email] => 
)

json_encoding the array does not help either. I am sure I'm missing something really obvious.
L'administrateur a désactivé l'accès en écriture pour le public.

add_participants remote control api il y a 5 mois 11 heures #101671

  • muhzak
  • Portrait de muhzak
  • Hors ligne
  • Fresh Lemon
  • Messages : 5
  • Karma: 0
HA!

The second I pressed submit on the post above I realized my issue.

Because we can add multiple participants. I need to go one deeper in the array.
$pData = array();
$pData[] = array('firstname'=>"testFirst", 'lastname'=>'testLasy',"email"=>"fake@gmail.com");
// and now I can add multiple. 
 
$addParticipant = $myJSONRPCClient-add_participants($sessionKey,$survey_id,$pData );

Thanks for the help.
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.268 secondes
Donation Image