2014-05-13 3 views
0

부트 스트랩 모달을 사용하여 새 SQLFORM을 팝업하고 있습니다.Web2py SQLFROM : 제출 단추를 부트 스트랩 단추에 넣기

SQLFORM 제출 단추를 부트 스트랩 단추에 넣으 려합니다. 따라서 부트 스트랩 버튼을 클릭하면 양식이 제출됩니다.

잘 모르겠습니다.

<script type="text/javascript"> 
     $('#submit').on('click', function (e) { 

    <?=tag_form.custom.submit?> 

}) 
</script> 
<div class="container"> 
<div id="example" class="modal hide fade in" style="display: none; "> 
<div class="modal-header"> 
<a class="close" data-dismiss="modal">×</a> 
<h5>New Tag</h5> 
</div> 
<div class="modal-body"> 
<?=tag_form.custom.begin?> 
<strong>Add Tag</strong> 
<br/><strong>Tag:</strong><? =tag_form.custom.widget.Tag?><br/> 
<br/><strong>Color</strong><? =tag_form.custom.widget.Color?><br/> 
<br/><strong>Owner:</strong><? =tag_form.custom.widget.Owner ?><br/>    
</div> 
<div class="modal-footer"> 
<a href="#" id="submit" class="btn btn-success">Call to action</a> 
<a href="#" class="btn" data-dismiss="modal">Close</a> 
<?=tag_form.custom.end?> 
</div> 
</div> 

<p><a data-toggle="modal" href="#example" class="btn btn-primary btn-small">New Tag</a></p> 
</div> 
<script src="<?=URL('static','js/bootstrap-modal.js')?>"></script> 

이 하나가 작동하지 않습니다

여기 내 코드입니다.

나는 작동하는 방법을 알아낼 :

 <div class="container"> 
<div id="example" class="modal hide fade in" style="display: none; "> 
<div class="modal-header"> 
<a class="close" data-dismiss="modal">×</a> 
<h5>New Tag</h5> 
</div> 
<div class="modal-body"> 
<?=tag_form.custom.begin?> 
<strong>Add Tag</strong> 
<br/><strong>Tag:</strong><? =tag_form.custom.widget.Tag?><br/> 
<br/><strong>Color</strong><? =tag_form.custom.widget.Color?><br/> 
<br/><strong>Owner:</strong><? =tag_form.custom.widget.Owner ?><br/>    
</div> 
<div class="modal-footer"> 
<a href="#" class="btn btn-success"><?=tag_form.custom.submit?></a> 
<a href="#" class="btn" data-dismiss="modal">Close</a> 
<?=tag_form.custom.end?> 
</div> 
</div> 

<p><a data-toggle="modal" href="#example" class="btn btn-primary btn-small">New Tag</a></p> 
</div> 
<script src="<?=URL('static','js/bootstrap-modal.js')?>"></script> 

을하지만 버튼을 꽤하지 않습니다. the submit button

어떻게하면 제대로 할 수 있습니까? 감사합니다.

답변

0

제출 버튼을 그냥 제출 제출 및 유형 및 가치 att put 양식 제출 의도가 작동합니다 web2py 태그를 넣어. 그리고 왜 파이썬 구분 기호를 변경 했습니까?

<div><button type="submit" value="submit" class="btn btn-primary">Submit</button></div> 

단지 확인 그것 custom.end 전에

관련 문제