I would like to load different web2py components in the same view, but not at the same time. I have 5 .load files which have form fields for a different scenario, these are called dynamically by an onchange select script. Is it possible with web2py to do this?
Share
Yes, but in that case, don’t use the
LOAD()helper in the web2py view, as that will generate Javascript that loads the component immediately upon page load. Instead, create a div with an id to hold the component, and have youronchangeevent handler call theweb2py_component()function with the id of the div as the target: