# ドロップダウンの選択項目を動的に設定(モバイル版)

**URL:** https://community.cybozu.dev/t/topic/677
**Category:** kintone 開発相談
**Created:** [2017 年 4 月 3 日午前 8:32 UTC](https://community.cybozu.dev/t/topic/677 "2017-04-03T08:32:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Legacy\_Account1629](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Legacy\_Account1629](https://community.cybozu.dev/u/Legacy_Account1629)
#### Post date: [2017 年 4 月 3 日午前 8:32 UTC](https://community.cybozu.dev/t/topic/677/1 "2017-04-03T08:32:27Z")

</div>

お世話になります。

動的にドロップダウンの選択項目を設定させる為、

スペースフィールドにドロップダウンを配置する形をとっております。

PC版では上記で良かったのですが、

モバイル版の場合は、スペースフィールドが表示不可・「getHeaderSpaceElement」のみ使用可能と言う事で、うまく配置することができません。

何かしら良い解決方法をご教示頂けると幸いです。

宜しくお願い致します。

【以下現PC版ソース】

```
var select1 = document.createElement("select");
select1.id = 'my_space_field_select1';
select1.name= 'select1';
select1.position = 'relative';
kintone.app.record.getSpaceElement('spacefield').appendChild(select1);

```

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![Legacy\_Account513](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@Legacy\_Account513](https://community.cybozu.dev/u/Legacy_Account513)
#### Post date: [2017 年 4 月 4 日午前 1:02 UTC](https://community.cybozu.dev/t/topic/677/2 "2017-04-04T01:02:28Z")

</div>

IR0000さん

&nbsp;

推奨される方法ではありませんが、

PC版JSは現在の方法を維持し、

モバイル版JSを別途、getSpaceElement関数を使わず、DOMを操作する形でアップするという方法がありそうです。
