I have a table in which I count the rows, and for each record it finds it uses that number to dynamically name the form field. i.e.
<input type=text name="FirstName<%=i%>">
I got that to work just fine. What I'm trying to do now, is post the form, and on the new page dynamically create cookies based on the number of form fields there are. For example, my desired end result would look something like this..
I have about 30 worker names (and their IDs in hidden fields) in one form, beside each worker I have a dropdown list with same items. When I select an item from dropdown list its ID is written in another hidden field. I want to submit values from hidden fields into another .asp page and sql db. If I use :
<% FOR EACH name IN Request.Form Response.Write("<BR>") Response.Write(Request.Form(name)) NEXT %>
I get only values from dropdown lists IDs. how to loop through all fields and get IDs of workers, too.
i have a form in which there many field, to make up a table.what i wnat to do is the first column has 7 fileds to allow user to input data into, the fields are named, A1,B1,C1,D1,E1 and so on.
what i want to do is loop through these and make sure that the user does not enter the same value or text name in more then one field. ie if mv90 is inputted into A1 it cannot again be inputted into any of the other fields.
Would anyone be able to give some guideance in ASP code as to how I would repeat a section of input fields in a form based upon the number of guests that are attending an event?
Basically, what needs to happen is if 3 guests are attending, I need the Name, address, city, state fields to repeat so they can be filled in with information.
Then all of the information from the whole form is submitted which returns an email to the administrator of the event.
for j = 1 to totalManagers2 Response.Write("# in J loop:" & j & "<br/>") If Request.Form("j") = "on" Then myToField = myToField + recipiant(j) Response.Write("recipiant's email is :" & recipiant(j) & "<br/>") validRecipiant = true End if next
My problem lies with line ' "If Request.Form("j") = "on" Then '...
Now on the first page, I have a form, which I dynamically populate a table, and for each row, I output an HTML checkbox. I assign the name of that check box to a # that is incremented within the for-loop that is outputting all the HTML table rows.
So I have check boxes with name attributes such as "1", "2", "3", "4" and so on.
My question is, on the next page, how do I tell if those check boxes are checked? I use the Request.Form("1"), Request.Form("2"), Request.Form("3"), Request.Form("4") and so on.
But as you can see, in my For-Loop, I'm just checking this... Request.Form(1), Request.Form(2)...and so on ....
So I am ignoring the quotation marks...how can I include them so the code knows to look at the form for the name attribute of "1" and not just 1?
I am trying to build a dynamic form based on user input.
Here is the story i want a user to select how many times he/she wants to add a product and then depending on the number selected draw x number of input boxes for product name,price etc.
Then pass this to another page, store in an array and add all this to a database!
i have an sms phone book that allows users to send multiple sms from the internet to a cell phone.
However when a users chooses to send bulk, it inserts the numbers into a textfield box seperated by commas. Which are in turn passed to the server side to be sent.
PROBLEM Now i would want to seperate each number and loop through them e.g
numbers could be : Note they are seperated by comma
How at the start of script can I dynamically loop through all Request.form variables and use them ? either name or the value, both is the ideal though.
example.
have a form:
2 textfields. named "text1" and "text2"
In asp I need to dynamically grab this data not knowing that this form had the textfields "text1" and "text2".
the username field must have the last user who connected ( saved using cookie) When i press the "cancel " botton of the form this username should disappear and appear again once i close and open the browser again
I have an asp page which has a number of form fields on it (about 50). 2/3rds of these fields are used to store username (windows username) and date (todays date). I want these fields to be locked so the user cannot enter any info into them. The infor will be grabbed from the current user and the current date.
However, I only want these fields to be populated only when the left most field is changed. Once the fields have been populated the username and date fields will change with however is logged in and the new date.
I have a form that will be filled out by users, what I would like to do is when the user selects a state from a dropdown list i want to have the City field show select options based on their state. I know this can be done but I dont remember how.
So I figured maybe it was something to do with the script tags so I tried using the <% %> tags instead and I got an error saying something like Microsoft VBScript runtime object required.
When you submit the form you can see I am trying to get the each row of the form elements into a format such that I can build multiple insert statements. Here is what I am working with:
<% Dim x For x = 1 to Request.Form.Count Response.Write Request.Form.Item(x) Next
Would I use some type of Mod operator on the value of x to determine my line breaks?
next response.write(myVariable) The problem with that is that response.write(myVariable) only prints the last field in the form.
I know that if I move the response.write(myVariable) INSIDE of the loop it will print correctly but I am not trying to print the form fields BUT I AM TRYING to store them in ONE variable.
Code to email form data via ASP. Forced to use CDOSYS by 2003 server at host. It sends an email fine, but the form data is missing. Where my going wrong? Could it be the html file's form actuating the .asp file? Could it be an enctype issue? Or bad ASP syntax... Code:
I have about 30 names of workers (and their IDs in hidden fields, that depend on their departments) in one form, beside them there is one dropdown list for each worker, with same items. I want to select item from dropdown list for each worker, that will write item ID in another hidden field... and then I want to submit worker's ID, ID from dropdown list etc....into another .asp page and sql db. If I use next way : <% FOR EACH name IN Request.Form Response.Write("<BR>") Response.Write(Request.Form(name)) NEXT %> I get only values of IDs from dropdown lists. But I need workers' IDs, too.
how can I send the whole form using the script below, without listing every NAME of the form. Basically I wondered if you can just put a certain code in that will send all the fields of the form without putting each NAME of the fields down indiv individualy??
My forms Name is 'conf', so I was wondering if there was a code like SENDWHOLEFORM="conf", (I know it obviously won't be that, but just to put the point across!)
<% DIM strNAME, Mailer strFirstName = Upload.Form("NAME")
I have created an email form in which all fields must be completed. If all the fields are not completed "submit" causes a refresh using response.redirect, Problem is allthe fields that were previously filled in are empty.How do I keep the values of the fields on refresh?
I have a form submitted with a form field called contents. This could have loads of text in. What i need to do is scan this field for words that match the text in a database record called PAC_WORD. This could match 3 or 4 of the words put. Basically for each word picked up I want to write " This item found is not allowed
I have a asp page that has a form that I have to submit to a third party website.if their is a way to create form values using asp to submit the secure data without having it in a hidden field where it can be seen when viewing page source?
Currently I have my asp code writing out hidden form fields using the response.write when the page loads then after everything is loaded JavaScript submits the form.
I am creating a form that uses a postcode lookup that opens in another window to confirm an address how would I pass back the address and populate the form?
I have a web form which is quite long. My first field is required. If my user submits the form the page just sits there and the do not see my validation message at the top of my page. how I can reposition teh page so they see teh message i.e.scroll back up the page?
i wrote a script in asp/vb script that validates form fields. all works fine, apart from the fact that alerts are being shown against the empty form fields when the page loads the first time.
so, validation should not be carried out when the page loads the first time. my friend challenged me and said i can achieve this "using a hidden form field or even the submit button" and submitting the page to itself
i was more thinking of using session variables or a session cookie, but does anyone know how you could accomplish this using a hidden form field?
Here's what I want to do ... or here's my problem. I have a 'ICQ' on my user's profile, so it's a number, now when I update the database it DOES NOT use the single quotes, so it looks like:
Now, the prob with it is when a user DOES NOT type anything in it, since he doesn't have a ICQ number, then it gives a syntax error because your inserting nothing without any single quotes. How do i fix it? Or how can I NOT make it update if it doesn't have anything in the text box?
have a problem of concantenating two form fields. I have 3 text boxes,which is supposed to grab the user date of birth information. One text box for the day, the other for the month and last one for the year.
I want a situation where i can just concantenate them into one variable to be picked up by my sql query like this 04-05-1982 into an access database. Now this is my code: PHP Code:
I can get all fields, but how do I not get the button in the loop
Dim FormFields Set FormFields = request.form Dim Field if request.form("Button2") = "Update Order" then For each Field in FormFields response.write Field & " = " & Request.Form(Field) & "<br>" Next end if
I'm working on a form where if a client makes an entry in one field, it causes another field to become unusable. The fields most likely will be drop-down lists. The form will be filled out online then mailed to me using the post method.