Seth schrieb: > When I try to use ImageButton() as my submit for a form, it throws the > error: The input field 'x' was not expected > > Here's my code: > > class SubmitForm(TableForm): > class fields(WidgetsList): > body = TextArea(default='Enter text here...', rows=2, cols=30) > submit = ImageButton(src='/images/share_button.png') > > Changing ImageButton() to SubmitButton() makes the form submit fine. > > What am I doing wrong? I'm not finding any special settings needed for > ImageButton() in the docs.
image-buttons submit the x and y coordinate of the pixel the user pressed. You need to add x and y as parameters to your controller - which the error-message indicates (well, it indicates the x, and you'd get a similar error with y once the x is added...) Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

