Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Add GET or POST param value to field

  • davideperi
  • davideperi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #116758 by davideperi
Add GET or POST param value to field was created by davideperi
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
The topic has been locked.
  • davideperi
  • davideperi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 months ago #116770 by davideperi
Replied by davideperi on 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
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #116782 by tpartner
Replied by tpartner on 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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose