フィールドの入力要素を取得
概要
getFieldInputElement 関数は、新規作成画面や編集画面で指定したフィールドIDに対応する入力要素を取得します。
これにより、ユーザー入力のカスタマイズや値の変更が可能になります。
構文
atPocket.app.record.getFieldInputElement(fieldId);
引数
| 引数名 | 型 | 説明 |
|---|---|---|
| fieldId | string | 取得したいフィールドのID |
戻り値
| 型 | 説明 |
|---|---|
| HTMLElement | 指定したフィールドの入力要素(存在しない場合は null) |
使用可能画面
- レコード作成画面
- レコード編集画面
使用例
const inputElement = atPocket.app.record.getFieldInputElement('field-1');
if (inputElement) {
inputElement.value = 'John Doe';
}