I'm trying to do a series of dependent inputs with Deform / Colander / Chameleon / Pyramid and can't find any examples. e.g.
Dropdown of Country yields->
Dropdown of State or Province or Division ..etc.. yields->
Dropdown of County or City ... might yield->
Dropdown of City ...
Can this be accomplished using Deform? (if it can't, should I look at an alternative form generating solution or go pure html/javascript/ajax/..?)
I'm simplifying this to geographic divisions. I'd prefer to send only the necessary part of the 12 million record database at the time the form is loaded and incrementally narrow as choices are made.
Here's a link to Deform's examples page: http://deformdemo.repoze.org/select_with_deferred/
This is so-called master/slave widget issue and it is not possible to solve this in HTML UI without JavaScript.
I would suggest you render full widgets with Deform and then write the showing/hiding logic in JavaScript.
A JavaScript / jQuery library a wrote long time ago to address use cases like this.
来源:https://stackoverflow.com/questions/28516980/dependent-cascading-inputs-using-deform