# Can't save consent field using gravity forms rest API

**URL:** <https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281>\
**Category:** Get Help\
**Tags:** consent, rest-api\
**Created:** [November 27, 2021, 12:10am UTC](https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281 "2021-11-27T00:10:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaide32](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shaide32](https://community.gravityforms.com/u/shaide32)\
**Post date:** [November 27, 2021, 12:10am UTC](https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281/1 "2021-11-27T00:10:23Z")

</div>

Hello everyone,  
I am trying to save the consent field input to a cms backend from vue.js frontend. I am using gravity forms [rest API version 1](https://docs.gravityforms.com/web-api/) to fetch and save the form data, and it is working fine for other form elements.  
But when I am trying to save the consent form data, it return this validation failed error:

> “Please enter a valid value.”

I am sending the form data in this format:

```auto
{
    input_19_1: "https://localhost:49153/wp-content/plugins/gravityforms/images/tick.png"
    input_19_2: "I agree to the privacy policy custom" 
    input_19_3: "description"
}

```

Here `19` is the consent field id.

I am not sure how to change the form data for successful submission.

Thank you.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [November 27, 2021, 5:54am UTC](https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281/2 "2021-11-27T05:54:40Z")

</div>

Hi Shahrukh. I believe that input\_19\_1 should be ‘1’ and input\_19\_2 should be your exact text from the confirmation. input\_19\_3 should not matter (that is the description only.)

```auto
{
    input_19_1: "1"
    input_19_2: "I agree to the privacy policy custom" 
}

```

---

<div class="post-metadata">

**Author:** ![shaide32](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shaide32](https://community.gravityforms.com/u/shaide32)\
**Post date:** [November 29, 2021, 6:46pm UTC](https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281/3 "2021-11-29T18:46:32Z")

</div>

Hello Chris,  
Thank you for replying.

I changed the `input_19_1` to “1” and removed `input_19_3`.  
Now it’s saving the data for the field except the label.  
The saved record shows only the checkbox and the description

As you mentioned, I am populating the field `input_19_2` with `checkboxLabel` property, which should be the exact text from the confirmation

 ![consent-form](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/4/43735a8ae63b0b4c4ed1a2ce92c342029870eeb6.png)

Please let me know what I am doing wrong here.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [December 29, 2021, 6:46pm UTC](https://community.gravityforms.com/t/cant-save-consent-field-using-gravity-forms-rest-api/11281/4 "2021-12-29T18:46:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
