2015-06-22 68 views
0

我想創建一個模式內的窗體。除了當我點擊我的「提交」按鈕時,我的大部分工作都會工作,即使未填寫必填字段,它也會關閉模式。他們是否保持模式打開?語義模式窗體按鈕

添加代碼:

模態:

<div class="ui standard billboard modal" style="margin-top: -197.5px; display: block !important;"> 
    <div class="header">Add Billboard Slide</div> 
     <div class="content"> 
      <div class="ui fluid form billboard"> 
       <div class="required field"> 
        <label>Type</label> 
        <input placeholder="" type="text"> 
       </div> 
       <div class="required field"> 
        <label>Image</label> 
        <input name="image" placeholder="" type="text"> 
       </div> 
       <div class="field"> 
        <label>URL</label> 
        <input name="url" placeholder="URL" type="text"> 
       </div> 
       <div class="required field"> 
        <label>Enable/Disable</label> 
        <input placeholder="" type="text"> 
       </div> 
       <div class="actions"> 
        <div class="ui red deny clear button"> 
         Cancel 
        </div> 
        <div class="ui positive submit button"> 
         Add 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
</div> 

莫代爾顯示:

$('.billboard.modal') 
    .modal('attach events', '.billboard.button', 'show') 
    .modal('setting', 'closable', false) 
; 
+0

我發現了onApprove($元素),如果它返回false,它會保持打開狀態,但是如何將它綁定到我的表單中? – softlyspoken

回答