Here's my scenario: I've got 2 channels, accounts and leads. The leads channel has a playa field (single select) that relates to accounts. Then I have a safecracker form that allows users to create a new lead entry. Everything works fine.
However, the current workflow dictates that the account must already exist before a lead can be associated with it. The ideal solution would allow the user to either choose an existing account, or create a new one without leaving the page, and updating the playa field with the new account.
I managed to get halfway there by placing a link beside the playa field which fires a modal with another safecracker form for the account creation, and using ajax to refresh playa select field. After adding the account entry, the new entry shows up in the playa select field, but when I submit the lead form, the playa field isn't being saved to the entry.
Has anyone tackled a similar problem? I would love to hear your solution/s.
Thanks,
Fabian