Hi,
as I said, you have to use a different approach.
Here I show two solutions:
1. This first only uses some css, the classes "no-question, no-bottom and "disable-irrelevant"
Put them into your "custom.css"
Code:
.disable-irrelevant.ls-irrelevant.ls-hidden {
display:block;
}
.disable-irrelevant.ls-irrelevant .form-control {
background-color: #eee;
cursor: not-allowed;
}
.no-question {
border-top:0;
margin-top: -5px;
}
.no-question .question-title-container,
.no-question .question-valid-container {
display:none;
}
.no-bottom {
border-bottom:0;
margin-bottom:0;
}
.no-question .answer-container {
padding-top: 0em;
padding-bottom: 0.5em;
}
.no-question .question-container {
border: none !important;
margin-top: -10px !important;
}
.no-bottom .answer-container {
padding-bottom: 0em;
}
First question (Q1a) - the text question gets the css classes "no-bottom disable-irrelevant"
Second question (Q1) - the bootstrap button gets the css class "no-question"
Furthermore the first question has the condition "Q1==1"
You may use one button or two
You see the text field initially is set to "disabled"
If you click "Update needed" the field changes to "editable"
2. This second uses javascript to hide the second question (here the second question is the text question)
and also the css classes "no-question" and "no-bottom"
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Identify this question
var thisQuestion = $('#question{QID}');
var nextQuestion = $(thisQuestion).nextAll('.text-short:eq(0)');
$(nextQuestion).hide();
// Listeners on the radios
$('input:radio', thisQuestion).on('click', function(e) {
var thisIndex = $(this).closest('.answer-item').index();
if(thisIndex<1) {
$(nextQuestion).show();
}
});
});
</script>
The click on the first button shows the text.
At the last remark: The value of the TOKEN:ATTRIBUTE is set in the default answer of the text questions.
Group G0 and question QSet is only necessary if you use the second solution.
Unfortunately you did not mention so far that you use other question types.
Joffm