- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#ls-button-submit').hide(); setTimeout(function () { $('#ls-button-submit').trigger('click').show(); }, 30000); // Proceed after 30 seconds }); </script>
Please Log in to join the conversation.
Wouldn't that allow a complete circumvention off the conjoint experiment?So you have to think about a different approach.
An easy one:
Place the link to your Conjoint experiment in a question of type "text display"
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<p>Please click to be redirected to the choice tasks.</p> <button>Go to choice tasks</button><script> $(document).ready(function() { var idnum=1234; // var idnum="{TOKEN:TOKEN}"; var url="https://mystudy.com/cgi-bin/ciwweb.pl?studyname=mystudy&amp;panelid="+idnum; $('#ls-button-submit').hide(); $('button').click(function () { $('#ls-button-submit').trigger('click').show() $(location).attr("href", url); return false; }); }); </script>
Please Log in to join the conversation.
<a class="btn btn-primary btn-lg active" href="https://www.server.de?panelid={SAVEDID}" role="button" target="_blank">Please, click to enter the experiment</a> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#ls-button-submit').hide(); setTimeout(function () { $('#ls-button-submit').trigger('click').show(); }, 30000); // Proceed after 30 seconds }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
<?php require_once 'jsonRPCClient.php'; define( 'LS_BASEURL', 'https://localhost/limeSurvey3x'); define( 'LS_USER', 'admin' ); define( 'LS_PASSWORD', 'password' ); $iSurveyID = $_GET['sid']; $sToken = $_GET['token']; if(ctype_alnum($iSurveyID) && (strlen($iSurveyID) == 5 || strlen($iSurveyID) == 6)) { // Valid SID format // 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 ); if(is_array($sSessionKey)) { // Invalid session echo $sSessionKey['status']; } else if($sSessionKey) { // Valid session // Get a response by token to determine the response ID and lastpage values $aFields = array('id', 'lastpage'); $tokenResponse = $myJSONRPCClient->export_responses_by_token($sSessionKey, $iSurveyID, 'json', $sToken, null, 'all', 'code', 'short', $aFields); if(is_array($tokenResponse)) { // Oops, a response error... // Print any errors print_r($tokenResponse); // Release the session key $myJSONRPCClient->release_session_key( $sSessionKey ); } // else { // There is a valid response... // Decode the returned base-64 string and convert to an array $decodedString = base64_decode($tokenResponse); $tokenResponseArr = json_decode($decodedString, True); // Get the first item in the $tokenResponseArr['responses'][0] array $tokenResponseArr2 = reset($tokenResponseArr['responses'][0]); // Define vars for the response ID and lastpage values $responseID = $tokenResponseArr2['id']; $responseLastpage = $tokenResponseArr2['lastpage']; // Increment the lastpage // ...or, you could hard-code a lastpage value here instead $responseLastpage++; // Update the response lastpage value $aResponseData = array( 'id' => $responseID, 'lastpage' => $responseLastpage ); $updatedResponse = $myJSONRPCClient->update_response($sSessionKey, $iSurveyID, $aResponseData); // Release the session key $myJSONRPCClient->release_session_key( $sSessionKey ); // Redirect to the next site header("Location: https://google.com"); die(); } } } else { // Invalid SID format die( 'Invalid format!' ); } ?>
Please Log in to join the conversation.
Please Log in to join the conversation.