Rest API - JSON and Form

Hi Wapplers,

I am calling a REST API successfully (an API that merges word doc templates into PDF).

I am executing this function from a form on the client side, so I need the Data Type to be Form. If I don’t set it as Form then the Submit button does not work and does not execute the function.

However, I also need the pass JSON data in the API call which won’t work unles the Data Type is set to JSON.

Is there anyway that I can have both Form and JSON?

It isn’t just changing the button to default instead of submit? Might be able to just change the button type?

Also what if you run it server side and then call the action script from the form and set form to server connect form?

Since you helped me find “docmosis” here is how I used it on my end.

You pass the JSON data in a form field name “data”.

The API knows it’s a form field because we choose data type “form”: that sends content-type: application/x-www-form-urlencoded

I am executing this function from a form on the client side, so I need the Data Type to be Form. If I don’t set it as Form then the Submit button does not work and does not execute the function.

You can trigger a form submit or “Server Connect Action” by using the dynamic events “Mouse → Click”

Thank you Krish.

I am having issues trying to get a list of data to show up in the repeating group fields on the Docmosis template. I successfully did this in Bubble but Wappler uses Multi Reference tables and not sure how to input the data into the “data” field on the API call. I know it needs to be JSOn but I keep getting blank results. Any tips?

Screenshots attached

Can you show me an example of the query return data ? Array object ?