# フォームブリッジのテーブルで、変更されたドロップダウンの値を別フィールドに転送したい。

**URL:** <https://community.cybozu.dev/t/topic/3617>\
**Category:** kintone 開発相談\
**Created:** [2018 年 12 月 13 日午前 8:42 UTC](https://community.cybozu.dev/t/topic/3617 "2018-12-13T08:42:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legacy\_Account781](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@Legacy\_Account781](https://community.cybozu.dev/u/Legacy_Account781)\
**Post date:** [2018 年 12 月 13 日午前 8:42 UTC](https://community.cybozu.dev/t/topic/3617/1 "2018-12-13T08:42:14Z")

</div>

フォームブリッジ内のテーブルに、ドロップダウンと１行テキストがあります。

ドロップダウンダウンの値が変更された場合に、１行テキストにその値をコピーしたいのですが、以下のコードまで書けた状態で詰まっています。

```
$(function(){
// テーブルのChangeイベントを拾う
fb.events.fields.Table_0.changed = [function(state){
// ドロップダウンを変更してから値の反映が適用されるまで0.2秒待つ
setTimeout(function(){
// ドロップダウンで選択した値を取得
var selectedVal = $(fb.getTableElementsByCode("Table_0", "ドロップダウン")[0]).find("input").val();

// 1行テキストに設置
$(fb.getTableElementsByCode("Table_0", "文字列 __1行__ 1")[0]).find("input").val(selectedVal);
}, 200);
return state;
}];
});

```

&nbsp;

テーブル内項目のchangeイベントを拾えないので、テーブルの値が何かしら変更されたタイミングで無理やりDomを解析して1行テキストに設置しています。

テーブル内項目のchangeイベントを検知したり、値を取得・設定する方法はありませんか？

※現時点では、テーブルの1行目しか設定されません。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account916](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Legacy\_Account916](https://community.cybozu.dev/u/Legacy_Account916)\
**Post date:** [2018 年 12 月 18 日午前 5:47 UTC](https://community.cybozu.dev/t/topic/3617/2 "2018-12-18T05:47:24Z")

</div>

[https://form.kintoneapp.com/help/customize](https://form.kintoneapp.com/help/customize)

ヘルプを見た感じ 「fb.events.fields.{fieldCode}.fields.{fieldCodeInTable}.changed イベント」というので出来そうです。

最近更新されたみたいですね。

[https://fb.kintoneapp.com/user/update.html](https://fb.kintoneapp.com/user/update.html)

---

<div class="post-metadata">

**Author:** ![Legacy\_Account781](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@Legacy\_Account781](https://community.cybozu.dev/u/Legacy_Account781)\
**Post date:** [2018 年 12 月 18 日午前 5:57 UTC](https://community.cybozu.dev/t/topic/3617/3 "2018-12-18T05:57:13Z")

</div>

回答ありがとうございます！

今日追加されたんですかねー？

&nbsp;

ヘルプページがちゃんとあったんですね。

ずっとこっちを見ていました。→[https://fb.kintoneapp.com/user/customize.html](https://fb.kintoneapp.com/user/customize.html)

&nbsp;
