Skip to main content

Hello,

I try to connect the Gravity Form from my wordpress website to one API of the government.

I don’t know how to manage the fields that are optional in the API.

 

"NomUsage" for example. It is a name. If user write in this field on my Gravity Form, no problem, this is written in the API call : "NomUsage" : "Nameofuser"

 

But if the user writes nothing in Gravity Form, this is written in the API call : "NomUsage" : "" and the API return an error because it expects the line to be removed.

 

Could you please help me ?

 

Thanks a lot !

 

Hi @Glomaro 

You may need to add custom Code logic to configure the API data JSON structure so it is dynamic.

Code: https://zapier.com/apps/code/help


Hi Troy,

 

Thanks a lot for your answer, I’ll try that.