agregar_ruta = SQLFORM.factory(Field("nombre_ruta", requires=IS_NOT_EMPTY()),
Field("Modalidad", default=modalidades[1],requires=IS_IN_SET(modalidades)),
Field("Tipo", default='Monolargo', requires=IS_IN_SET(tipo)),
Field("Grado", default=grados_roca[2], requires=IS_IN_SET([], multiple=False)),
Field("Artifo", label="Artifo?", default=grado_artifo[0], requires=IS_IN_SET(grado_artifo)),
Field("Zona", label="Zona (no olvides seleccionar la zona)",default=zonas_list[0],
requires=IS_IN_SET(zonas_list, zonas_list_name)),
Field("Observacion", 'text', length=300,
default='No se han registrado observaciones', label="Observaciones"),
_name="agregar_ruta",
submit_button="Agregar",
)
return dict(agregar_ruta=agregar_ruta)
<div class="modal fade" id="modal_agregar_ruta" 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">×</span></button>
<h4 class="modal-title" id="myModalLabel">Agregar Nueva Ruta</h4>
</div>
<div class="modal-body">
{{=agregar_ruta}}
</div>
</div>
</div>
</div>
<script>
function agregarRuta() { $('#modal_agregar_ruta').modal('show'); };</script>
if agregar_ruta.process(formname='agregar_ruta').accepted:
do something
Hello,I have this function that helps me to edit a record from DB.
--def studentUpdate():
return dict(formCarreraUpdate=crud.update(db.Student,request.args(0),message=T("Done!")))and would like to open it's view on a modal (popup style) on the same page that I'm working. Something like the image. I tried but fail because the form it doesn't send the data back to the server. Is there any friendly way to achieve that?
Thanks!!
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/25f2fab1-189d-4482-955b-db0cca4ca717%40googlegroups.com.