0

My problem is as follows. I have a system to create accounts. However, different users can set different attributes to the created account. That means I get a dynamic form with different attributes for different users. How should I process such a form?

0

2 Answers 2

1

Once you have the client side sorted out with jQuery then you probably want to process the form values based on whether there is an entry of any kind. Look to use the following on the controller to get the entire form collection:

public ActionResult AddUser(FormCollection formvals)
{
    //Check for existence of form values and save as appropriate

    return View();
}
Sign up to request clarification or add additional context in comments.

Comments

0

It looks like you need hide/show some HTML elements based on the user selection. Take a look at jQuery to manipulate the form element on the client side.

1 Comment

That doesnt sound bad, however, I get the list of allowed attributes from a web service and by time the number of attributes increases and I dont want to compile every timea new action with these additional attribues. Anyway I'll give it a try, thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.