Nov 12, 2020
0
Level 6
Show hide divs dynamically
So I have a quiz I'm building and I've run into a small issue when it comes to clicking my next button.
I have a variable set on my livewire component called $nextQuestion. In my view I'm trying to do the following but it's not putting the value in the page I want it.
@click="question_{{ (int)$key }}: false; question_$wire.nextQuestion: true;"
I was expecting this to return @click="question_1: false; question_2: true;" the question_1:false works just fine. The part I'm having issues with is using question_$wire.nextQuestion: true doesn't actually put the integer in the place of $wire.nextQuestion.
Please or to participate in this conversation.