Reputation: 21194
We've got an ASP.NET MVC-based business form with multiple text boxes to fill out (e.g. a use-case would be "Register person" -> form contains: Name, ..., Father, Mother, ...)
The data entry clerk should not be forced to input father/mother himself, he should be able to search for the person in the system. It is not enough to have some kind of autocomplete field or popup, he should be able to make use of the full-fledged search page we already implemented (Person controller has SearchIndex & SearchPerson action, user has all kind of search options).
The final UI should look like this: Register person form has a button "Select father" which switches the UI to the search page, user searches the person and has the ability to click "Select" on a row in the result table which returns the UI back to the register person form, father-data is now filled into the read-only fields (hidden ID, name & birth date are visible but not editable).
Our problem/question: What is the recommended way to
a) save already entered data in the original form when opening the search form? Is it really necessary to open the search form in a jquery dialog with an IFRAME inside to stay on the same page and not lose the entered data?
b) how to return the selected ID back to the original form and pre-fill the readonly text boxes?
I hope you know what we're trying to achieve, otherwise please comment and I will clarify the question.
Upvotes: 3
Views: 1325
Reputation: 31
I would implement something new and use the Jquery UI Dialog to do the search and and selection. You may/should refactor the existing search system to support different UIs for exactly this purpose or just code a new one.
Upvotes: 1
Reputation: 2156
I see two alternatives:
Notes:
You can always combine client/server side technologies as needed.
You can use the session, as suggested, but any other storage mechanism for transient data would do the job (key value store: Redis? document db, etc).
Upvotes: 0