How to set (this) value for an action? What about form builder field?
My issue is this. I want an action that works on "this" field. I don't want to explicitly define the title in the $set method, because A). There will be multiple fields of this kind and B). I'd rather do $set('this', $value) without explicitly specifying the title. How do you solve this?
In the above example, my custom class just encapsulates the details of this function. I add it to a form component, and pass in the name. But, if I have multiple actions attached to multiple components in a Form Builder, the names will repeat. Does this action then change them ALL?
I don't know how to do something like $set(this, 'Hello World') instead of explicitly defining the name.
Solution:Jump to solution
Edit: Figured this out. If you pass the name of the component, even if you have multiple, it will only affect the group you are working in. So having multiple hero components for instance, will only change the one you are invoking.
It is hurting my brain a bit but it works....
1 Reply
Solution
Edit: Figured this out. If you pass the name of the component, even if you have multiple, it will only affect the group you are working in. So having multiple hero components for instance, will only change the one you are invoking.
It is hurting my brain a bit but it works.