Professional Web Applications Themes

Form: extract VALUE and DISPLAY value? - ASP Database

What is the best way to extract incoming ID form variables and their corresponding text values. Is there an easy way to extract both the initialized value on the form and its DISPLAY value. For instance my form element may look this: <input type=text name="StateID" value=<%=StateID%>>Florida But, when I process the form I require both the StateID and the Display value: StateID=1 State=Florida Is there a way to do this without looping through the form...I already have an existing asp processing page for about 30 form fields and hope I don't have to revise the page logic too much? Thanks ...

  1. #1

    Default Form: extract VALUE and DISPLAY value?

    What is the best way to extract incoming ID form variables and their
    corresponding text values.

    Is there an easy way to extract both the initialized value on the form and
    its DISPLAY value.

    For instance my form element may look this:

    <input type=text name="StateID" value=<%=StateID%>>Florida

    But, when I process the form I require both the StateID and the Display
    value:

    StateID=1
    State=Florida

    Is there a way to do this without looping through the form...I already have
    an existing asp processing page for about 30 form fields and hope I don't
    have
    to revise the page logic too much?

    Thanks
    Jason


    Guest

  2. #2

    Default Re: extract VALUE and DISPLAY value?

    The text, "Florida" is not part of a form element. It is just text within
    the page, and it will not be sent to the server when the form is submitted.
    You could put that value in a hidden input, if you like. In order for any
    data to be submitted to the server on form submission, the data must exist
    in an input element, i.e.
    <input type="text|password|checkbox|radio|file|image|hidd en"> or
    <select...> or <textarea...>

    So, you could do:
    <input type="text" name="StateID" value="<%=StateID%>">Florida
    <input type="hidden" name="StateName" value="Florida">

    Ray at work

    <com> wrote in message
    news:phx.gbl... 


    Ray Guest

  3. #3

    Default Re: extract VALUE and DISPLAY value?

    Ok, but supposing these values were coming out of a database would it be
    considered wasteful to implement that 'extra' hidden field for the display
    value.

    I have seen other concantenate values using eg: '_'
    345_Florida
    ...and they then use string manipulation to seperate them
    on the processing page but I find this messy....

    Your thoughts?

    Thanks
    Jason
    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:%phx.gbl... 
    submitted. [/ref]
    and [/ref]
    don't 
    >
    >[/ref]


    Guest

  4. #4

    Default Re: extract VALUE and DISPLAY value?

    In that case, I'd probably either do a value="345,Florida" or just do
    value="345" since the database already knows that 345 corresponds to
    Florida. It would depend more on what I needed to do with that "Florida"
    data and what it is that makes it necessary to have it submitted.

    Ray at home

    <com> wrote in message
    news:phx.gbl... 


    Ray Guest

  5. #5

    Default Re: extract VALUE and DISPLAY value?

    Thanks...makes sense.

    - Jason
    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:phx.gbl... [/ref]
    display 
    >
    >[/ref]


    Guest

Similar Threads

  1. Using SDK to Extract Form Data to XML
    By Tarek_Adnan_Faham@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 40
    Last Post: April 5th, 10:50 AM
  2. Extract Form Data to XML in memory Stream
    By Shagun Grover in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: June 19th, 06:03 AM
  3. Help with form/display
    By bkendall in forum Macromedia ColdFusion
    Replies: 1
    Last Post: July 1st, 11:51 PM
  4. extract data from adobe form field
    By Marites_Tolentino@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: April 23rd, 06:54 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139