Can't save consent field using gravity forms rest API

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 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:

{
    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.

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.)

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

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

Please let me know what I am doing wrong here.

Thank you.

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