This topic is locked

Add Records Page

2/11/2005 5:10:07 PM
ASPRunnerPro General questions
W
WeB author

Im testing the software out and it is awesome. Saving me hours of figuring code. One thing that is a must and I just dont know ASP well enough to find it. When I add a record I dont want it to clear the data. I want to hit save and I want it to upload the data to the database but I want all the data to stay filled in so we can change one or two feilds and save another record rather than filling in all the info again that may be duplicated.
Any Help would be greatly appretiated.

Sergey Kornilov admin 2/11/2005

Hi,
you can set default values for all fields that you need to be pre-polulated to Request.Form("FieldName"). Just don't forget to replace FieldName with actual field name.

W
WeB author 2/12/2005

Not exactly what I was trying to explain.
Let me give you an example.

I generated an ASP app to keep track of serial numbers. Customer Name, Serial Number, Model Number, Customer Order. When I hit save I want all the info to remain filled in until I hit Reset so all I have to do is change the serial number. I may do 20 entries with all the data the same except the serial number field then everything will change and may only enter one or two more records. So I dont want it to default to a value every time because it will not stay the same all the time. I just want the data to remain when I hit save. It seems like after you click add it automatically resets all the fields but I couldnt find the code that did that.
Hopefully this is clearer.

Sergey Kornilov admin 2/13/2005

Hi,
did you try to add a default values as I recommended?
This will prevent edit boxes from being emptied after record was added.

W
WeB author 2/14/2005

Sorry I must have misunderstood your first response.
I understand what you are saying but now my next question is where? I go to edit the template and open the ADD form but what code am I looking for?

Sergey Kornilov admin 2/14/2005

You need to proceed to Formatting tab in ASPRunnerPro and set Edit as type of those fields to Text field. Click Change ... and set Default value of each field. Rebuild project and enjoy.

W
WeB author 2/16/2005

WORKS! Misunderstood what you were explaining in the begining. I didnt want a permanent default but I see it is just pulling the value that was already set. One last thing, can you think of a way to clear the values at some point without going back to the record view and clicking add new.
Thanks a bunch! Good software, I shall go purchase it now.

Sergey Kornilov admin 2/16/2005

I'm glad you got it working!
Resetting values can be done via some custom Javascript function. I don't have a ready to go code snippet that does it. I'll send you one when I have it.