If you do all that stuff with jquery, why not have jquery hide the original select (or modify it for that matter), and on select of an author, have jquery set the selected author as 'selected' in the dropdown box? That way there is no need for a custom validation or insertion, and when somebody has js turned off, it still works like a dropdown. TiNo
On Tue, Sep 30, 2008 at 6:00 PM, Donn <[EMAIL PROTECTED]> wrote: > > Perhaps if I ask it in a different way: > 1. A 'book' has a title (string) and an author (foreign key). > 2. I use a ModelForm from the model. > 3. I want the 'author' form-control to look like this: > Author:______ [click here to choose or add an author] > 4. When you click the link it opens a div. > 5. The div shows all the authors (and has an add form) > 6. When you click on an author it fetches the pk from the link (all done > with > jquery) > 7. It then (should) leave the control something like: > Author:38 Bear, Greg [click here to ...] > > Now this is where I lose the plot: > a. How to 'stuff' that pk value into the author control > b. How to get it to validate. > c. How to get it to save an author object on form.save() > > If anyone can put me out of my misery... I am going in loops. Even been > hitting the source but it hurts my eyes :) > > \d > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

