On 25/02/2009, at 3:20 AM, Graham Higgins wrote:
> >> I should be able to read >> through these new docs in the next couple of days, so will provide >> any >> feedback if I have any. > > Thanks, that would be useful. Hi, there were a number of errors I had to correct to get it working. Notes pasted below. However, after getting it working I decided I didn't like how formbuild worked and I have switched to using ToscaWidgets (tw.forms) instead. NOTES for http://bel-epa.com/pylonsdocs/associated_packages/formbuild/formbuild_in_pylons.html * build.py requires StandardForm definition: class StandardForm(formbuild.Form): pass * Controller email_form() action: - return render_response('/email_form.mak') + return render('/email_form.mak') * And corrected these lines: return 'You are %s years old and ' % \ (results['age'],) + \ 'have the following email: %s' % \ (results['email'],) * Add to helpers.py: from routes import url_for * email_form.mak corrected to: ${c.form.start_with_layout(h.url_for(action='email_form'))} ${c.form.field(label='Email', field=c.form.text('email', 'example.com', id='email'), required=True, help="Enter a valid email address", error=c.form.errors.get('email', ''))} ${c.form.field(label='Age', field=c.form.text('age', id='age'), required=True, help="Age, in years", error=c.form.errors.get('age', ''))} ${c.form.field(field=c.form.submit('submit', value="Submit"))} ${c.form.end_with_layout()} Cheers, Chris Miles --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
