Change repeater field label based on other field value
I have a wizard form and there's a repeater on step 4. I'd like to change the label of one of the fields inside the repeater based on the value of a field on step 1. It works fine if it's outside the repeater but the $get('fieldname') comes back NULL if it's inside. Is there a way to pass that field value into the repeater somehow so it can be accessed and passed into the label() closure?
I can provide code snippets if necessary.
Solution:Jump to solution
If anyone else needs something like this, I was able to pass in the
$livewire
object instead of $get
. Then you can evaluate $livewire->data['fieldname']
within the closure.1 Reply
Solution
If anyone else needs something like this, I was able to pass in the
$livewire
object instead of $get
. Then you can evaluate $livewire->data['fieldname']
within the closure.