カタログ変数タイプ「選択ボックス」について

a_129
Mega Guru

find_real_file.png

上記画像赤下線部にある選択ボックスの「--なし--」というテキストを他のテキストに変更することは可能でしょうか?

または、「--なし--」を入れずに初期値を空白にすることは可能でしょうか?

質問を必須にしたいのですが「--なし--」を使用しない場合、選択肢が自動で入力されてしまい必須が消えてしまいます。

良い方法をご存じでしたらご教授いただければ幸いです。

1 件の受理された解決策

iwai
Giga Sage

値の無い選択肢を追加することで、「-なし-」の代わりに表示することができます。必須入力にも対応していて、必須入力にすると値のある選択肢を選ぶ必要があります。

find_real_file.png

元の投稿で解決策を見る

2件の返信2

Vasantharajan N
Giga Sage
Giga Sage

You can use onLoad client script to make the change to label from "--None--" to the required value.

Please replace the field_name with the actual field value or variable value (if catalogue item) and "--My new None replaced string--"

function onLoad() {
    g_form.removeOption("field_name", "");
    g_form.addOption("field_name", "", "--My new None replaced string--", 0);
}

Result:-

Note: Still the field will be mandatory

find_real_file.png

 


Thanks & Regards,
Vasanth

iwai
Giga Sage

値の無い選択肢を追加することで、「-なし-」の代わりに表示することができます。必須入力にも対応していて、必須入力にすると値のある選択肢を選ぶ必要があります。

find_real_file.png