Fill participant table attributes through URL

Más
1 mes 2 semanas antes #191730 por asaha
i have created a participant table with 8 diff attributes [attribute_1, ... attribute_8}
I am trying to fill these attributes with some values, while having the survey set to be open for public registrating so that I can track the various traffic sources and campaigns.

is there a way to fill these attributes by passing them in a URl string say something like

limesurvey.com/index.php/781278?lang=en&...ttribute_1=mydayblog

so that i can store mydayblog under attribute_1 in participant table?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
1 mes 2 semanas antes #191734 por Joffm
What is the intention that you want to store in TOKEN_ATTRIBUTES?
If you pass the parameters you may grab it in a simple question of type "short text".

And how do you add the parameter if you

while having the survey set to be open for public registrating


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191736 por asaha
@Joffm main purpose of storing in token_attribute is to ensure that i can capture which campaign a new registartion came from.

the survey can only be taken after registration, and email validation, so it's important that i have a token table active.

I could have used a short field to capture, but then the email validation is not a possibility and also same email can be used multiple times to access a survey.

is there a way to write into token table of a survey?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191738 por DenisChenu
There are no included solution, and i don't know existing workaround solution

You allow register : you can create a plugin
1. Put url params in session in manual.limesurvey.org/BeforeRegister
2. Put the attributes in beforeTokenEmail / type : register

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes - 1 mes 2 semanas antes #191753 por tpartner
You could load the URL parameters into the register form via JavaScript.

Something like this in your theme custom.js file:

function getURLParameter(name) {
	return decodeURI(
		(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
	);
}	
 
$(document).on('ready pjax:scriptcomplete',function(){
 
	if($('#register_attribute_1').length > 0) {
		$('#register_attribute_1').val(getURLParameter('attribute_1'));
	}
});


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Adjuntos:
Última Edición: 1 mes 2 semanas antes por tpartner.
El siguiente usuario dijo gracias: DenisChenu

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191755 por asaha
Hi Tony,

this is what i am trying to do, but being unsuccessful so far. Do i need any kind of authentication to write into token table? or just making a change in theme js file will do the trick?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191757 por tpartner
Try it. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191758 por DenisChenu

DenisChenu escribió: …i don't know existing workaround solution

tpartner escribió: You could load the URL parameters into the register form via JavaScript.


Lol :)

Thank you Tony !

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes #191770 por asaha
Hi Tony,

Your method worked, but this means I have to make the fields visible for the respondent. And show whatever I am capturing through the URL.

Is there any other possibility of doing this with attributes hidden

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 2 semanas antes - 1 mes 2 semanas antes #191773 por tpartner
Hide the input with CSS. Something like this in your custom.css file:

#register_attribute_1 {
   display: none !important;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Última Edición: 1 mes 2 semanas antes por tpartner.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión