Use of MVC Dynamic Forms

Oct 2, 2009 at 5:59 AM

Hi,

   I need to know how to use this Class library. Have you made any test application for that? or Guide me regarding this.

I will be very thankful to you for that.

Kashif Amin

Coordinator
Oct 2, 2009 at 7:42 PM

My plans are to clean up and refactor the code and also create a demo application sometime soon. Until then here is a quick rundown of how to use this thing:

  1. Create an instance of DynamicForm.
  2. Create instances of objects that inherit from DynamicFormField.
  3. Set properties of the DynamicFormField objects for things like required fields, regular expression validation, error messages, html display options.
  4. Add the instances of the DyanamicFormField to the Fields collection of your DynamicForm object.
  5. Call DyanmicForm.RenderHtml() in your view.
  6. In the action method that handles the form's submission, rebuild/update the DynamicForm object from submitted data. 2 ways:
    1. Accept a parameter of type DynamicForm. A class called DynamicFormModelBinder will handle the work for you.
    2. Update an existing DynamicForm object (maybe one stored in session) explicitly using UpdateModel(myDynForm) or TryUpdateModel(myDynForm)
  7. Call DynamicForm.Validate() to check that required fields have values and that regex fields match their regex. If true, then valid. If false then redisplay the Form using DynamicForm.RenderHtml(). Errors will be automatically rendered.

Hope that helps get you started. I will write that demo app pretty soon.

Nov 29, 2010 at 7:54 AM

Hi,

I need to know how to use MvcDynamicForms.dll in my project?. Have you made any test application for that?

Is there any test application for creating dynamic control one by one on a button click using asp.net mvc? Suppose I took a dropdown list and a button. Dropdown list having option as text like "TextBox", "Combobox", "RadioBox", "Select". Here user will select the control type and click on button, that selected control will create in a div.

Is there any test application for creating dynamic control one by one? 

I will be very thankful to you for that.

Sujeet

Coordinator
Nov 29, 2010 at 11:49 AM

Download and look at FormProvider.cs for example use.

If you have more questions start a new discussion thread.

Thanks

Feb 21, 2013 at 10:31 PM
Edited Feb 21, 2013 at 11:52 PM
Thanks
Coordinator
Feb 22, 2013 at 12:21 AM
Not much has changed. Try it and let me know if you have a problem.

On Thu, Feb 21, 2013 at 6:31 PM, eyobayou <notifications@codeplex.com> wrote:

From: eyobayou

ronnieoverby wrote:
My plans are to clean up and refactor the code and also create a demo application sometime soon. Until then here is a quick rundown of how to use this thing: Create an instance of DynamicForm. Create instances of objects that inherit from DynamicFormField. Set properties of the DynamicFormField objects for things like required fields, regular expression validation, error messages, html display options. Add the instances of the DyanamicFormField to the Fields collection of your DynamicForm object. Call DyanmicForm.RenderHtml() in your view. In the action method that handles the form's submission, rebuild/update the DynamicForm object from submitted data. 2 ways: Accept a parameter of type DynamicForm. A class called DynamicFormModelBinder will handle the work for you. Update an existing DynamicForm object (maybe one stored in session) explicitly using UpdateModel(myDynForm) or TryUpdateModel(myDynForm) Call DynamicForm.Validate() to check that required fields have values and that regex fields match their regex. If true, then valid. If false then redisplay the Form using DynamicForm.RenderHtml(). Errors will be automatically rendered. Hope that helps get you started. I will write that demo app pretty soon.
Hi,
I am introduced to this site just yesterday. Thanks for the big work.
I will appreciate it if you can update your response so that I can get a hold of the latest use.
Thanks!

Read the full discussion online.

To add a post to this discussion, reply to this email (mvcdynamicforms@discussions.codeplex.com)

To start a new discussion for this project, email mvcdynamicforms@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com