# INVALID_ON_CLICK_ACTION_PAYLOAD in WhatsApp Flows: Can't Bind Form Data? Here's the Fix
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-05-14
Category: Troubleshoot
Category URL: https://www.heltar.com/blogs/category/troubleshoot
Tags: WhatsApp Flows Error
Tag URLs: WhatsApp Flows Error (https://www.heltar.com/blogs/tag/whatsapp-flows-error)
URL: https://www.heltar.com/blogs/invalidonclickactionpayload-in-whatsapp-flows-cant-bind-form-data-heres-the-fix-cmans1m2q0022runb2yt4iog1

If you're hitting the **INVALID\_ON\_CLICK\_ACTION\_PAYLOAD error** in WhatsApp Flows with a message like:

**"Value of 'Form' component cannot be used in form binding."**

You're likely trying to use ${form.form\_name} directly in your button’s payload — and that’s not allowed.

## The Fix:

You can’t bind the entire form object (${form.form\_name}) directly. Instead, you must reference individual fields from the form.

Do this:

```
"payload": {
  "text": "${form.form_name.input_name}"
}
```

Not this:

```
"payload": {
  "text": "${form.form_name}"
}
```

## Why This Happens

WhatsApp Flows only allows dynamic binding to individual form fields. Trying to pass the entire form\_name object (like ${form.form\_name}) breaks the schema — hence the INVALID\_ON\_CLICK\_ACTION\_PAYLOAD error.

It's similar to referencing a whole <form> tag in HTML instead of a specific input value. WhatsApp Flows expects atomic data, not an object blob.

## Best Practice

When setting up your on-click-action, always bind to specific form fields like this:

```
{
  "type": "Form",
  "name": "form_name",
  "children": [
    {
      "type": "Input.Text",
      "name": "user_name",
      "label": "Your Name"
    },
    {
      "type": "Footer",
      "label": "Done",
      "on-click-action": {
        "name": "navigate",
        "payload": {
          "text": "${form.form_name.user_name}"
        }
      }
    }
  ]
}
```

## Pro Tip

Use meaningful field names (email, phone, feedback) so your bindings are easy to read and debug. Also, always validate bindings before publishing to avoid runtime failures.

For more troubleshooting insights related to WhatsApp Business API, check out [heltar.com/blogs](https://www.heltar.com/blogs).


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

