Changes between Version 1 and Version 2 of CustomFormFields


Ignore:
Timestamp:
02/20/2006 09:36:31 AM (10 years ago)
Author:
lllama
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CustomFormFields

    v1 v2  
    3434After much messing about I've found that things are a lot simpler than first appeared.  In order to validate the input I've subclassed TextField and added a new validation method to its validator list.  I created a new render method which simply turns the list into something more presentable.  I then created a new convert_post_data method which takes '80:tcp, 443:tcp' or whatever and turns it into a list of ids from the joined table.
    3535
    36 This now appears to work correctly in my application but fails in the admin view.  When I know more I'll update this page.
     36This now appears to work correctly for adding but not editing.  This is due to the render method getting passed the user input or a list of IDs depending on what manipulator gets called.  I can modify the user's data to change it to a list of IDs but this would need doing in the view and doesn't feel 'neat' enough.
     37
Back to Top