Logo
For example "scheduled tasks"
Search
Info
Content
Category Navigation
  • 🎯  Solution Guides

  • Low Code Solutions

    Add "Tabs" to your app

    ID Target Link

    Use an address field to display a static street view thumbnail

    Turn your menu into a fixed menu

    Auto close mobile menu

    Display record information in a card

    How to add a back button to your app

    Add a collapsible accordion element to your app

    Code Snippets

    PHP Curl Create New Record

    PHP Get Records With Filters

    Google Scripts - Get record and create new records from connected table

    Save Tables and Fields into Spreadsheet

    Google Scripts - Export all records

    Webhook to save deleted records

    Send Messages to Slack

    Restrict Space and Force Uppercase in a Form

    Building Advanced Features

    Use Validation Rules to Ensure Unique Votes Per User

    Use Record Rules to Create an Audit Log

    Track current inventory with transactions

    Schedule Bookings and Prevent Double Bookings

    Create orders with multiple items and varying quantities

    2 Step Forms

    Unique Record Validation

    Restrict Editing Records to Record Owners

    Sum date/time field

    Duplicate Records

    Advanced App Customization

    How to embed a Tadabase page on another website

    Adding external fonts

    Custom Favicon

    Making apps mobile friendly

    Show date/time as a countdown

    Importing many images at once

    Adding QR Codes

    Adding charts to PDFs

    Customizing your app shortcut for mobile phones

    Animate parts of a page

    Design Customization

    Changing background colors

    Set background colors to the edge of a page

    Change the background of a column

    Add padding around a component

    Using an image as background for a page

    Adding a background image to a row, column, or component

  • Duplicate Connected Records

Categories
🎯 Solution Guides
Code Snippets
PHP Curl Create New Re...

PHP Curl Create New Record

PHP Snippet to create a new record. 

Be sure to update the API Keys and FIeld Slugs. 

<?php
$tadabaseAppId = 'YOURAPPID';
$tadabaseApiKey = 'YOURAPIKEY';
$tadabaseApiSecret = 'YOURSECRET';
$tableId = 'TABLEID';

$url = 'https://api.tadabase.io/api/v1/';
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => $url."data-tables/".$tableId."/records",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => urldecode(http_build_query(array(
    'field_36' => 'TEST Curl', //Text
    'field_37' => 'Some Pretty Long Text Some Pretty Long Text Some Pretty Long Text Some Pretty Long Text', //Long Text
    'field_38' => '<h1>Rich Text</h1>', //Rich Text
    'field_40' => 'moe@tadabase.io', //Email
    'field_58' => 'tadabase.io', //Link
    'field_43' => '100.1234', //Number
    'field_44' => '999.99', //Currency
    'field_42' => '8005551212', //Phone
    'field_56' => '5', //Rating
    'field_59' => '99', //Slider
    'field_45' => '2020-11-14', //Date
    'field_46' => '19:30:00', //Time
    'field_47' => '2020-01-22 19:30:00', //Date and Time
    'field_48[start]' => '2020-01-22 19:30:00', //Date Range Start
    'field_48[end]' => '2020-01-22 21:30:00', //Date Range Start
    'field_48[all_day]' => true, //Date Range Add Day 
    'field_39[title]' => 'Mr.',
    'field_39[first_name]' => 'John',
    'field_39[middle_name]' => 'C',
    'field_39[last_name]' => 'Doe',
    'field_41[address]' => '9048 Monte Mar',
    'field_41[city]' => 'Los Angeles',
    'field_41[state]' => 'CA',
    'field_41[zip]' => '90035',
    'field_49' => 'Checkbox', //Checkbox
    'field_50' => 'radio1', //Radio
    'field_51' => 'Select2', //Select
    'field_53' => true, //Decision
    'field_52' => array('multiselect1', 'multiselect2'), //Multi-Select
    'field_61' => array('4MXQJdrZ6v', 'DVWQWRNZ49'), // Multi join
    'field_62' => 'DVWQWRNZ49' // Single Join
    ))),
  CURLOPT_HTTPHEADER => array(
    "X-Tadabase-App-id: ".$tadabaseAppId,
    "X-Tadabase-App-Key: ".$tadabaseApiKey,
    "X-Tadabase-App-Secret: ".$tadabaseApiSecret  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

How did we do ?

Previous Section
Low Code Solutions
Next Article
PHP Get Records With Filters
Back to top
API
100% Operational
Apps
100% Operational
Builder
100% Operational
Overall Status
100% Operational