Common Airtable field properties

This article describes common properties available to all Airtable fields, which you can edit in the web editor’s UI, but also shows how the same properties can be used dynamically with JavaScript.

Airtable Field

Name

This is the internal name of the field that is provided by Airtable and can’t be changed.

Field's name

JavaScript

Copy the field’s name to access the field from JavaScript:

fd.rendered(() => {
   // set the field's title using it's name
   fd.field('FieldName').title = 'Last Name';
});

Title

This is the title of the field that is provided by Airtable. To change it, modify the corresponding column name in Airtable.

Field's title

Type

This is the type of the field that is provided by Airtable and can’t be changed.

Field's type

General

Title

Specify text of the title that will appear next to the field.

Field's title

Can also toggle Title’s visibility on/off:

Hide Field's title

Title can be changed directly on the form after a double click:

Edit Field's title

JavaScript

This code will allow you to get or set the field’s title dynamically:

// get the field's title as a string
fd.field('Text1').title

// set the field's title
fd.field('Text1').title = 'Last Name';

Hint

Defines a placeholder text that appears in the input before a user starts typing:

Hint property

This property is available for Single-line Text, Multi-line Text, Number, Drop Down, Date, Date and Time fields.

JavaScript

This code will allow you to get or set the field’s placeholder text dynamically:

// set the field's Hint
fd.field('FieldName').placeholder = 'Enter your name';

Description

Add a description to the field.

Field's description

It would appear as small text right under the field.

Field's description on the form

JavaScript

This code will allow you to get or set the field’s description dynamically:

// get the field's description as a string
fd.field('Text1').description

// set the field's description
fd.field('Text1').description = 'New description';

Read-only

Select if the field will read-only or not. Read-only fields display their value as plain text and don’t allow modifying it.

Field's read-only status

Required

Select if the field will be required to submit the form or not.

Field's required status

Required status can also be changed directly on the form via the Asterisk button:

Field's required status button on the form

JavaScript

This code will allow you to get and set field’s required status

// get the field's required status as true/false
fd.field('Text1').required;

// set the field's required status
fd.field('Text1').required = true;

Layout

Select if the title will appear to the left of the field, or right above it.

Field's orientation

Layout can also be changed directly in the context menu of the selected field:

Field's orientation button on the form

Class

Add a CSS class to the field, which comes in handy with CSS or even JavaScript code. This will work like class attribute for an HTML tag.

Field's class

Same class can be applied to multiple fields, and then you can use CSS to modify the appearance of these fields. For example, here we’ve used the following CSS code in CSS editor to give fields with my-class a blue background, white text and rounded corners, with a little bit of padding:

.my-class {
    color: #FFFFFF;
    padding: 10px;
    background-color: #1E90FF;
    border-radius: 30px;
}

Field's class with CSS on the form

To access this propery, click the “More options” bar at the bottom of General.

The "More options" bar

Style

Add custom CSS style to the field. This will work like style attribute for an HTML tag.

Field's style

This style will allow you to hide the field, making it invisible to user (but still usable with JavaScript):

display: none;

You can also apply different styles to it. For example, the following style will allow you to add a thin gray border around the field:

padding: 10px;
border: 1px solid #CED4DA;

Field's style applied on the form

To access this propery, click the “More options” bar at the bottom of General.

The "More options" bar

Title

Width

Specify in pixels how much space should the field’s title take.

Field's Title width

Font

Specify the following font parameters for the field’s title:

  • font size:

    Field's Title font size

  • font style font style (Normal, Bold or Italic):

    Field's Title font style

  • font color (use the color picker or enter a Hex color code):

    Field's Title font color

Wrap

Select if the title’s text should wrap in multiple lines when there is not enough space, or just be shortened until it fits (with dots… at the end).

Field's Wrap

Control

Width

Specify in pixels how much space should the field’s control take.

Field control's width

Font

Specify the following font parameters for the field’s control:

  • font size:

    Field control's font size

  • font style (Normal, Bold or Italic):

    Field control's font styling

  • font color (use the color picker or enter a Hex color code):

    Field control's font color