www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to generate text templates using form fields with dependencies?

  1. #1
    Join Date
    May 2013
    Posts
    1

    How to generate text templates using form fields with dependencies?

    Ok, that's a confusing title, allow me to explain.

    I'm looking for the best way to create a tool that will present users with fields, and when an item in a field is selected, additional fields are displayed. Once the user has gone through the flow and made all selections, the results should be displayed to the user in plain text format for copy/pasting. For example:

    Field 1
    Option 1
    Option 2 -> selecting this leads to -> Field 2 with only options 1, 4, and 5 available, and including Field 3
    Option 3 -> selecting this leads to -> Field 2 with only options 2 and 3 available, and including Field 3 and Field 4

    Field 2
    Option 1
    Option 2
    Option 3 -> selecting this leads to -> Field 6 with all options available, and including Field 5
    Option 4
    Option 5

    Field 3

    Field 4

    Field 5

    Field 6
    Option 1
    Option 2
    Option 3

    In the end, the user might be presented with something like this to copy/paste exactly as it is displayed:

    [FIELD 1] Option 3

    [FIELD 2] Option 3

    [FIELD 3]

    [FIELD 4]

    [FIELD 5]

    [FIELD 6] Option 1

    Did any of that make sense?

  2. #2
    Join Date
    Mar 2011
    Posts
    1,145
    It's certainly possible to create a page that will do what you describe, but not with HTML alone. You'll need JavaScript to create and delete the form field elements as the user changes his selections, and at the end create your text output. You might post a request for help over in the JavaScript section here if you don't know JavaScript.
    Rick Trethewey
    Rainbo Design

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles