Forums / General / Prefill ezSurvey fields with GET-parameters

Prefill ezSurvey fields with GET-parameters

Author Message

Reinhard Hutter

Thursday 07 April 2011 3:53:12 am

I'm trying to dynamically preselect / prefill certain fields of an ezSurvey by passing the values as GET parameters to the form, but so far I've failed. I've done trial & error with all variations of the "ContentObjectAttribute_ezsurvey_answer" parameter, e.g.

http://www.domain.com/my_survey?ContentObjectAttribute_ezsurvey_answer_1797_672=Product1
http://www.domain.com/my_survey?ContentObjectAttribute_ezsurvey_answer_1797=Product1
http://www.domain.com/my_survey?ContentObjectAttribute_ezsurvey_answer_672=Product1

Is this possible at all with ezSurvey? (I need a dynamic preselection, depending on which page is linking to the survey, another value should be passed to the survey).

Peter Keung

Thursday 07 April 2011 8:09:03 am

You can override any of the question type templates here:

extension/ezsurvey/design/standard/templates/survey/view/

You could then, for example, add another condition within the "value" field for a text entry to do a fallback check for your important GET variable (or eZP view parameter) with the ezhttp and ezhttp_hasvariable template operators.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada