Professional Web Applications Themes

Passing form entry to URL variable - Macromedia ColdFusion

Hi, I'm on to my user administration section, and I want there to be a page where administrator enters a 'buildnumber' into a form, clicks search and then gets taken to a page where he can edit the details for this buildnumber. At the moment, I have made a form and am trying to pass the buildnumber entered in a text field through to the edit page as an URL variable....however it won't work. Code is this... <form name='form1' method='post' action='useredit2.cfm?buildnumber=#FORM.buildnumbe r#'> <input name='buildnumber' type='text' id='buildnumber'> <input type='submit' name='Submit' value='Submit'> </form> It passes static numbers, text etc. through no problem, ...

  1. #1

    Default Passing form entry to URL variable

    Hi, I'm on to my user administration section, and I want there to be a page
    where administrator enters a 'buildnumber' into a form, clicks search and then
    gets taken to a page where he can edit the details for this buildnumber. At
    the moment, I have made a form and am trying to pass the buildnumber entered in
    a text field through to the edit page as an URL variable....however it won't
    work. Code is this... <form name='form1' method='post'
    action='useredit2.cfm?buildnumber=#FORM.buildnumbe r#'> <input
    name='buildnumber' type='text' id='buildnumber'> <input type='submit'
    name='Submit' value='Submit'> </form> It passes static numbers, text etc.
    through no problem, but as soon as I want it to send the form entry through it
    simply doesn't. Any help appreciated....maybe there's even a 'proper' or
    better way to do this??!!! Appreciate your help, Ben

    benkayuk Guest

  2. #2

    Default Re: Passing form entry to URL variable

    Putting the action as "=useredit2.cfm?buildnumber=#FORM.buildnumber# " seems a
    little redundant. Form.buildnumber will automatically be passed to the next
    page when you submit (e.g. you don't need to pass it in a url variable). So
    on page useredit2.cfm, just reference the variable form.buildnumber and it
    should work. I.E.
    <cfquery name="asdf" datasource="asdfasd">
    SELECT *
    FROM whatever
    WHERE buildnumber = #form.buildnumber#
    </cfquery>

    Tulsa Guest

Similar Threads

  1. Passing Dynamic Variable In A Hidden Form
    By Chizzy66 in forum Macromedia ColdFusion
    Replies: 6
    Last Post: February 25th, 03:49 AM
  2. form variable passing
    By realtime158 in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: January 9th, 02:26 PM
  3. Passing A Form Variable
    By drdagwood in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: July 14th, 08:45 PM
  4. Passing form variable
    By Nifkins Bridge in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 17th, 09:15 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