Results 1 to 3 of 3

Thread: Dynamically created html form

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Dynamically created html form

    Hi,

    Im begining to write a dunamically generated, database driven form. It will be split into several sections, each section having a "next" button, that will save the current section and proceed to the next.

    Ive not begun yet but as its generated dynamically this will all be on the same page and either postback, or redirect to itself and the questions will be loaded into a repeater, choosing the input type based on whatevers in the database.

    Ive read several posts on here already regarding this and found some good advice, but my porblem is that one section of the form works slightly differently.

    I need to ask all the names and birthdates of everyone who lives with you, so I would need the form fields, an input button and then when pressed save the data and load into a repeater, which will have its own delete button as itemcommand.

    My issue is I've no idea how to go about this dynamcioally, or even if its a good idea. I hope someone can offer any advice.

    Thanks Dave

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Dynamically created html form

    Hello,

    So we are clear, where does the Delete Button come into play here?

    Are you saying that after a user has entered in a person, or multiple persons, you might want to provide the ability to delete that person?

    As for stepping through the "pages" of the repeater, you might want to look into the MultiView or Wizard control. From there, you could dynamically edit the controls that appear in either of these controls, rather than creating the whole thing from scratch.

    Gary

  3. #3

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Re: Dynamically created html form

    Hi Gary,

    The family members will be stored in a seperate table with a many to one relationship with the main table. A user will start with a querystring of page=1. I query the database for page 1's list of questions, I was then going to load these into a repeater.

    User presses next, all questions are saved and the page redirects with a querystring of page=2.

    Process repeats for page 2's questions

    The only issue is adding family members works differently as they will not be saved on the next button, but on a seperate button on the page, this data will display into a further repeater nested in the original, with delete buttons.


    Its just making this dynamic im struggling with.

    Ive not really started yet as I was just gathering ideas, but when I have some code I'll post it.

    Thanks Dave
    Last edited by davebat; Dec 7th, 2011 at 04:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width