【发布时间】:2021-06-01 22:03:51
【问题描述】:
我正在尝试在 Wix 上的表单中插入一个元素。当用户从下拉菜单中单击一个选项时,询问“您想出售多少商品?”,根据用户选择的数字,会出现多个小表单。以下是来自 stereobuyers.com 的示例:
这是我到目前为止所做的代码,第 1 组是设备表单,引用下拉列表是下拉列表。现在它只是显示而没有进入两个输入字段之间,这是我所期待的。
$w("#group1").hide();
$w("#quoteDropdown").onChange((event) => {
let newValue = event.target.value;
console.log(Number(newValue))
let quantity = Number(newValue);
// if the quantity is more than 1 show the equipment form
if(quantity > 0) {
$w("#group1").show()
}
})
【问题讨论】: