What's the output of /form_show if you call it directly? One thing I noticed is that you are specifying TableLayout inside TableForm, which is wrong as TableForm is actually a Form subclass with a TableLayout child.
On Thu, Mar 27, 2014 at 8:17 PM, Diego García <[email protected]>wrote: > Still not working in TurboGears 2.3.2 with ToscaWidgets 2 > > *Ttis is de form:* > > from tgext.ajaxforms import ajaxloaded > > @ajaxloaded > class TestForm(twf.TableForm): > class child(twf.TableLayout): > name = twf.TextField('Name', > validator=validators.String(not_empty=True)) > surname = twf.TextField('Surname', > validator=validators.String(not_empty=True)) > > ajaxurl = '/form_show' > action = '/form_submit' > > *This is te controller:* > > from tgext.ajaxforms import ajaxform > > class RootController(BaseController): > form_show = ajaxform(TestForm) > > @expose('pruebas.templates.ajax') > def demo3(self, *args, **kw): > return dict(form=TestForm) > > > @expose() > @validate(TestForm, error_handler=demo3) > def form_submit(self, **kw): > return 'Thanks: {Name} {Surname}'.format(**kw) > > > *This is the template mako* > > <%inherit file="local:templates.master"/> > > <%def name="title()"> > Demo > </%def> > <div class="well" id="data-model"> > <div id="myform"> > ${form.display(name='HI')} > <div id="myform"> > </div> > > *This is the result:* > > <div id="TestForm"></div> > <script> > jQuery(document).ready(function() { > jQuery('#TestForm').load('/form_show', {}); > }); > </script> > <div id="myform"> </div> > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/turbogears. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/d/optout.

