- Posts: 77
- Thank you received: 4
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Is it possible to alter the "Always hide this question" attribute via the API?
- bruce78
- Topic Author
- Offline
- Senior Member
Less
More
6 years 8 months ago #156195
by bruce78
Is it possible to alter the "Always hide this question" attribute via the API? was created by bruce78
I am thinking about exploring the LimeSurvey API. The API use case I have in mind is...
Is this possible?
- to create a copy of a survey
- to then alter the the "Always hide this question" attribute of 2 or 3 questions on a case by case basis
- to then activate the survey to collect responses
Is this possible?
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 8 months ago - 6 years 8 months ago #156204
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Is it possible to alter the "Always hide this question" attribute via the API?
I have not tested but I would say "probably". You can use the
set_question_properties() method
to adjust a question - probably the easiest way to find out what the $aQuestionData requires is to use the
get_question_properties() method
on an existing question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 8 months ago by tpartner.
The topic has been locked.
- bruce78
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 77
- Thank you received: 4
6 years 8 months ago #156206
by bruce78
Replied by bruce78 on topic Is it possible to alter the "Always hide this question" attribute via the API?
Cool, thanks Tony...
I was also thinking that this could be done by editing the question via the lime_question_attributes table.
Once you know the qid, it seems that you just need to add a 'hidden' entry in the 'attribute' column... does that also sound possible to you as another way to achieve the same outcome?
I was also thinking that this could be done by editing the question via the lime_question_attributes table.
Once you know the qid, it seems that you just need to add a 'hidden' entry in the 'attribute' column... does that also sound possible to you as another way to achieve the same outcome?
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 8 months ago #156215
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Is it possible to alter the "Always hide this question" attribute via the API?
Sure, I suppose you could modify the database values directly - that's what the API does for you.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- bruce78
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 77
- Thank you received: 4
6 years 8 months ago #156222
by bruce78
Replied by bruce78 on topic Is it possible to alter the "Always hide this question" attribute via the API?
Cool, thanks...
The topic has been locked.