Add GET or POST param value to field

More
2 years 9 months ago #116758 by davideperi
davideperi created the topic: Add GET or POST param value to field
Hi, is it possible to add a default string value to a field from a URL GET or POST param?

Example:
I create a textfield "test"
I launch the survey passing a GET param like /?test=value

Thanks for your support.

Best regards
Davide

Please Log in to join the conversation.

More
2 years 9 months ago #116770 by davideperi
davideperi replied the topic: Add GET or POST param value to field
Hi Everybody,

the only way I found to setup a value inside a field is to use custom attribute in the token table to setup the custom attribute.
Then I change the field default value to {TOKEN:ATTRIBUTE_1} for example, and finally to setup the field read only I manipulated the survey using Javascript as described here:
manual.limesurvey.org/Workarounds:_Manip...to_this_Wiki_page.3F

Hope this help.
Regards

Please Log in to join the conversation.

More
2 years 9 months ago #116782 by tpartner
tpartner replied the topic: Add GET or POST param value to field
You can prefill survey answers using the survey URL, exactly as you describe in the original post - manual.limesurvey.org/Workarounds:_Surve...ling_survey_elements

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!