Re: [Cppcms-users] Custom form rendering and dynamic widgets
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-08-30 04:15:25
|
> May I use a construct like > <% foreach widget in form %> here? Yes, you can. See: http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1form.html it has forward iterator in it and thus you can iterate over the form. There is an example from src/hello_world_view1.tmpl <% foreach w as cppcms::form::iterator in form %> <% separator %><br/><% item %> <% if w.has_message() %><% w.message() %>:<% end %> <% form input w %> <% if not w.valid() %>:<% w.error_message() %><% end %> <% end %> <% end %> Artyom |