Jan 17, 2022 11:25 AM
I am having a weird problem I wonder if anyone can help me with.
I have a form that returns 2 different errors intermittently on submit, even when data is exactly the same.
errorType: "FIELD_NOT_IN_FORM_DEFINITION" message: "Error in 'fields.phone'. Field 'phone' isn't in form definition"
message: "Invalid input JSON on line 1, column 894: Cannot build PublicApiCommunicationConsent, some of required attributes are not set [value]" status: "error"
is anyone able to help me shed some light on why this could be happening? I have checked the "internal name" for phone and it is definitely 'phone'.
The second error occurs even though every value is set.
If I delete 'phone' from the form it submits as expected. If I leave phone blank, sometimes the form submits, sometimes I get the second error from above.
The phone field is a dependent field if that makes a difference
Jan 18, 2022 4:25 PM
Jan 19, 2022 4:58 AM
I think I found the reason. We had two fields with the same name, "phone", one which is a "contact" property and the other a "organisation" property, the form is meant to collect "contact" data with all of the fields being of that type. The person who built the form had accidently selected "organisation" phone... it's since been changed to the correct property type and the form works as expected.
The error messages had me thinking it was at code level so a bit unhelpful - if there's anyway to get more helpful error codes that would be great but at least it's sorted!
Thanks so much for replying!