If you want to upload to work you have to put an iframe in modal, not LOAD. 

On Tuesday, 15 March 2016 19:30:08 UTC-5, 黄祥 wrote:
>
> is it possible to make modal work when upload form field have the data? 
> i've tested before the form submit button only show working... (no error 
> traceback occured but the result is not expected)
> *my code :*
> *controlelrs/transaction_purchase.py*
> def modal_raw_material():
> form = SQLFORM(db.raw_material, fields = None)
> if form.process(formname = 'form_modal').accepted:
> current.response.js = '(function($) 
> {$("#modal_raw_material").modal("hide");}(jQuery));'
> redirect(current.request.env.http_web2py_component_location, client_side = 
> True)
> elif form.errors:
> current.response.flash = 'form has errors'
> return dict(form = form)
>
> *views/transaction_purchase/purchase_order_form.html*
> {{=form}}
>
> <div class="modal fade" id="modal_raw_material" tabindex="-1" 
> role="dialog" aria-labelledby="myModalLabel">
> <div class="modal-dialog" role="document">
> <div class="modal-content">
> <div class="modal-header">
> <button type="button" class="close" data-dismiss="modal" 
> aria-label="Close"><span aria-hidden="true">&times;</span></button>
> <h4 class="modal-title" id="myModalLabel">{{=DIV(T('Raw Material') ) 
> }}</h4>
> </div>
> <div class="modal-body">
> {{=LOAD('transaction_purchase', 'modal_raw_material.load', ajax = True) }}
> </div>
> </div>
> </div>
> </div>
>
> *views/transaction_purchase/modal_raw_material.load*
> {{=form}}
>
> thanks and best regards,
> stifan
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to