I have a form with a source repeater and an API action that creates a new entry in another form that has the target repeater. This works fine unless I make the field in the target repeater a required field. Then the API action fails with a 409 error and message in the log: "field691-689-": "Repeater Text cannot be blank." However, I am sending a value to this repeater field.
This is in Formidable's knowledge base on API formatting for repeaters:
This seems to indicate I need to add something more than just the dummy row "":"" to my API action, but I there is no example to help me know what to do exactly. Does anyone have a solution for this? Why would I need to send dummy data to the repeater when I'm sending actual data to it? This is the part of my API action for the repeater:
"limj8": {
[foreach vtyb0]
"[id]":{
"691": "[ao4gr]"
},
[/foreach vtyb0]
"":""
},
You're code doesn't look correct. Did you follow this example? https://formidableforms.com/knowledgebase/formidable-api/#kb-add-values-in-a-repeater
Hi Victor, yes and it works fine except when the target repeater has required fields in it. I see I missed pasting in the last two lines in the code."form_id": "member-profile"
}It's the same as the example basically, except I'm using keys instead of IDs where Formidable does not say they are not allowed. I decided to submit a ticket to Formidable and they said they are giving it to their development team to look at.
Let us know how this turns out. You may have uncovered a bug if it's going to the devs.
So I got the fix! Formidable support gave me a pre-release version of Formidable Pro and a slightly altered syntax to use. The dummy row, along with the comma before the closing tag of the foreach shortcode, has been removed.
{ "8ij302": "Yes",
"x0jq42": "[x0jq4]",
"tybx": "[tybx2]",
"3vudx": "[1fg4y show=value]",
"limj8": {
[foreach vtyb0 sep=","]
"[id]":{
"691": "[ao4gr]"
}
[/foreach vtyb0]
},
"form_id": "23"
}
Please login or Register to submit your answer