For the 1st must be used in beforeQuestionRender and get it by HTML already produced. Then need to be sure of {$sgq} .
the second can be used at more place.
If 1st is OK for the id (#answer{SGQ}) : it muts giove the same value.
BUT : there are no $input->textContent; for radio checkbox for example … ONLY for text input
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.