adding a form to autocomplete result display

I would like to have an autocomplete field, that when no match is found, presents a form to enter the data and then updates the autocomplete field once that form is submitted. (ajax style, I don't want to lose the form the user is on)

One solution we just came up with is to use an auto complete field and an observe_field, and include a "Not in list" entry in the result set, and when it is selected, then the observe_field opens up the form to enter the new data.

The trick is, I don't want to re-type that data; I want it to remember what was typed in the autocomplete field. I thought about having a hidden field to update the autocomplete selection to (which the observe_field wold monitor), but as near as I can tell from the documentation, that's not possible.

My next idea that might work is to have the last entry be "Not in List (entered data)" where the entered data is in the text, and then when the observe_field sends off to the server for the entry form, it can parse the info. Seems like a really round about way to do it.

Does that make sense? Does anyone have any other ideas?

David Morton Maia Mailguard http://www.maiamailguard.com mortonda@dgrmm.net

David Morton wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

I would like to have an autocomplete field, that when no match is found, presents a form to enter the data and then updates the autocomplete field once that form is submitted. (ajax style, I don't want to lose the form the user is on)

One solution we just came up with is to use an auto complete field and an observe_field, and include a "Not in list" entry in the result set, and when it is selected, then the observe_field opens up the form to enter the new data.

The trick is, I don't want to re-type that data; I want it to remember what was typed in the autocomplete field. I thought about having a hidden field to update the autocomplete selection to (which the observe_field wold monitor), but as near as I can tell from the documentation, that's not possible.

My next idea that might work is to have the last entry be "Not in List (entered data)" where the entered data is in the text, and then when the observe_field sends off to the server for the entry form, it can parse the info. Seems like a really round about way to do it.

Does that make sense? Does anyone have any other ideas?

David Morton Maia Mailguard http://www.maiamailguard.com mortonda@dgrmm.net

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFUMmbUy30ODPkzl0RAu6cAJ9kHr4uH1cRBM4lU3ic0xv4s4R5DACgoYtz h87sbBiMW1nEbUiv8J2Cli4= =N2nG -----END PGP SIGNATURE-----

You could probably further bastardize the auto_complete function based on this...

http://www.sciwerks.com/blog/2006/10/09/using-an-auto_complete-to-ensure-uniqueness/

_Kevin