2015-08-24 20 views

回答

6

可以使用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}} 
相關問題