how to use set in a repeater
I have a select called hospital_id, and within the same form I have a tab that inside there is a repeater called procedures, how do I modify the value of the repeater with $set when I change the hospital select (which is outside the tab )
8 Replies
this is my select:
and this is my tab with the repeater inside:
I'm using inside the hospital select to try to get to the repeater, but I couldn't
I solved it using
@Alvarez🐳 its in the document, no need to go thru all tht trouble https://filamentphp.com/docs/3.x/forms/fields/repeater#using-get-to-access-parent-field-values
Hi, the documentation teaches how to get the value from inside the repeater, I needed the opposite (get the information from outside the repeater)
using array to set repeater
$set('key',$array)
array should contains repeater field and value
yes yes 😁
Okay
what do you mean by this?
for ex, I have a structure like:
-- TextFather: Name
-- Repeater:
----Text-Input
How can I set the Text-Input inside the Repeater with the value of TextFather (which is Name)?
u can use afterstateupdated
and set('field',$array_contain_textinput_name_and_value)