UI Builder button trigger client script and fill input of textarea value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 11:59 PM
Hello,
I have in my ui builder a textarea and under that a button. Now i want the value of the textarea to end up in a client script when something is entered in the textarea and then the button is clicked. For this I have selected “Execute Client script” for the button under Events and selected my created client script here. But now I can't get it to read the value from the textarea field in my client script. Can anyone help me here? I have following in my client script:
function handler({api, event, helpers, imports}) {
api.setState('textInput',event.payload.textarea_1);
}
But the value of textarea will be not filled.
Thank you for your help
0 REPLIES 0