[Cppcms-users] form.load(context()) doesnt work when...
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-05-12 02:25:05
|
a field such as select gets populated by AJAX. Ive got 2 selects. One gets populated the usual way via select.add(name, value) and depending on what user chooses, the 2nd select gets populated through AJAX. The problem is the only way to get the value is via request().post(name). In effect this bypasses form.validate() You can't even set the 2nd select field manually - form.myselect.selected_id(request.post("myselect")) this causes an exception because myselect hasn't been populated with the right values from the beginning. Petr |