- Posts: 12
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Activate Tokens Remote Control - Additional Attributes
- bmdavis
- Topic Author
- Offline
- New Member
Less
More
5 years 3 months ago #178714
by bmdavis
Activate Tokens Remote Control - Additional Attributes was created by bmdavis
Hello,
I'm looking for a little more specificity or an example for the RPC activate_tokens command, specifically regarding additional attributes.
The reference mentions:
Can someone please provide an example using the attributefields array?
I'm looking for a little more specificity or an example for the RPC activate_tokens command, specifically regarding additional attributes.
The reference mentions:
Can someone please provide an example using the attributefields array?
The topic has been locked.
- bmdavis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 1
5 years 3 months ago #178900
by bmdavis
Replied by bmdavis on topic Activate Tokens Remote Control - Additional Attributes
Anyone have an example for the format of RPC activate_tokens command - attributefields array?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
5 years 3 months ago - 5 years 3 months ago #178902
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Activate Tokens Remote Control - Additional Attributes
Here is a simple PHP example:
Code:
<?php define( 'LS_BASEURL', 'http://path/to/limesurvey/'); define( 'LS_USER', 'admin' ); define( 'LS_PASSWORD', 'password' ); require_once '../../../../../application/libraries/jsonRPCClient.php'; $iSurveyID = 123456; // Instantiate a new RPC client $myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' ); // Get a session key $sSessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD ); // Define attributes $aAttributeFields = array(1, 2, 3); // Activate the tokens $tokenActivation = $myJSONRPCClient->activate_tokens($sSessionKey, $iSurveyID, $aAttributeFields); // The returned result if($tokenActivation['status'] == 'OK') { echo 'Tokens created for survey '.$iSurveyID.'.'; } else { echo 'Tokens NOT created for survey '.$iSurveyID.': '.$tokenActivation['status']; } // Release the session key $myJSONRPCClient->release_session_key( $sSessionKey ); ?>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 5 years 3 months ago by tpartner.
The following user(s) said Thank You: DenisChenu, bmdavis
The topic has been locked.
- bmdavis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 1
5 years 3 months ago #178970
by bmdavis
Replied by bmdavis on topic Activate Tokens Remote Control - Additional Attributes
Thanks Tony! That definitely worked. Any chance we can also pass in a "Field Description" through the API?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
5 years 3 months ago #179028
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Activate Tokens Remote Control - Additional Attributes
As far as I know, that is not currently possible.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- bmdavis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 1
5 years 3 months ago #179084
by bmdavis
Replied by bmdavis on topic Activate Tokens Remote Control - Additional Attributes
Thanks again tpartner.
How can I make a feature request to notify the developers that this would be desirable feature to add?
How can I make a feature request to notify the developers that this would be desirable feature to add?
The topic has been locked.
- bmdavis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 1
5 years 3 months ago #179085
by bmdavis
Replied by bmdavis on topic Activate Tokens Remote Control - Additional Attributes
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
5 years 3 months ago #179106
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Activate Tokens Remote Control - Additional Attributes
You can create your oanw function in remote control,
See : gitlab.com/SondagesPro/RemoteControl/extendRemoteControl for a demo.
See : gitlab.com/SondagesPro/RemoteControl/extendRemoteControl for a demo.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.