1
我正在做流星項目,我正在使用AutoForm package。 現在我想從我的表單中的選擇下拉列表中刪除「(Select One)」字段。我怎樣才能做到這一點?如何刪除AutoForm下拉列表「(Select One)」字段?
我正在做流星項目,我正在使用AutoForm package。 現在我想從我的表單中的選擇下拉列表中刪除「(Select One)」字段。我怎樣才能做到這一點?如何刪除AutoForm下拉列表「(Select One)」字段?
可以使用firstOption
屬性來指定一個標籤,例如:
{{#autoForm id="selectForm" schema=Schemas.Select}}
{{> afFormGroup name="favoriteYear" options=options firstOption="Please select your favorite year"}}
<button type="submit" class="btn btn-primary">Submit</button>
{{/autoForm}}
,或者您可以通過設置firstOption
屬性false
自動選擇第一個選項(而沒有空值):
{{#autoForm id="selectForm" schema=Schemas.Select}}
{{> afFormGroup name="favoriteYear" options=options firstOption=false}}
<button type="submit" class="btn btn-primary">Submit</button>
{{/autoForm}}