The Created time field is used to track the time of the item’s creation. When creating a new record, the field doesn’t display on the form.
This field can’t be modified by the user since its value is provided by Airtable. When added to a Plumsail form, it will display it’s content as uneditable text.
Airtable Field |
General |
Title |
Control |
---|---|---|---|
In this section, you can find basic examples of how to work with the field using JavaScript.
For more examples, check out Working with form fields in JavaScript article. If you are not familiar with the JavaScript framework, get started with the JavaScript basics.
Note
The field is only accessible once the form is rendered, so all calls to the field must be inside fd.rendered event:
fd.rendered(() => {
// access the field's value and print in the browser's console
console.log(fd.field('Field1').value);
});
Access the value of the field. Note that modifying the value on the form does not result in changes in the Airtable record.
// access field's value
fd.field('Field1').value;
Access HTML element inside the field in order to modify it, hide it, or do something else.
// access field's control
let htmlField = fd.field('Field1').$el;
// access field's block, which includes title and control
let htmlFullField = fd.field('Field1').$parent.$el;
Hide the field from the user. The field value can still be accessed with JavaScript:
// hide field
fd.field('Field1').hidden = true;
// show field
fd.field('Field1').hidden = false;