Hi all - I wanted to know what folks would advise when connecting BR to services like custom forms in Carrd? Carrd allows you to add custom code to a form but it also offers to send the contents to a url via POST/GET or AJAX where you add in headers via their interface.
I’m struggling to get either working and I’m not sure if it’s something I’ve done (most likely) or if it’s a quirk about how Carrd takes/formats code.
Here’s what I’ve tried:
The fields are ‘Name’ and ‘Email’
1 - Custom code:
curl \
-X POST \
-H "Authorization: Token MYTOKEN" \
-H "Content-Type: application/json" \
"https://api.baserow.io/api/database/rows/table/TABLENUM/?user_field_names=true" \
--data '{
"Name": document.forms[Name],
"Email": document.forms[Email],
"Active": true
}'
I’ve also tried:
POST https://api.baserow.io/api/database/rows/table/TABLENUM/?user_field_names=true HTTP
Authorization: Token MYTOKEN
Content-Type: application/json
{
"Name": [Name],
"Email": [Email],
}
2 - URL
https://api.baserow.io/api/database/rows/table/TABLENUM/?user_field_names=true
Method: AJAX
Format: tried both default and json
Under headers I added 2:
Authorization: Token TOKEN_ID
Content-Type: application/json
I know I’m most likely doing something blatantly wrong but just can’t figure it out. Thanks in advance if anyone has ideas