I am collecting a registration question for an event.
One of the eventr registration issues:
What is your main job function? Director/MD/Owner Manager Team Leader Other: Please state
I would like it to appear as a drop-down list or a list of radio buttons on my screen, but also with a text box below or next to the βOtherβ radio object, so that the free form βOtherβ job function can be entered. How do I relate this to my point of view?
I suspect my model will contain:
[Display(Name = "What is your main job function?")] public string JobFunction { get; set; }
... where the JobFunction is populated with the selected item above. But how do I override the selected item in my controller if it is βOtherβ and replace it with a text box on the view?
I am sure this has been done many times before - so thanks for any help,
Mark
source share