Change outside label text when link is clicked in row template

If you’re changing something on the form because of an action inside a row template, your best bet is to use events.

In the form’s init method, set an event handler on the repeating panel that will trigger a form function when the event happens.

self.repeating_panel_1.set_event_handler('x-reload', self.reload_mysteries)

Then in the row template, trigger the event:

self.parent.raise_event('x-reload')

That gives you a way for the row template to trigger a function in the form. The function in the form can easily get to any of the form’s components.

1 Like