MX Kollection Forum :: Modifying form data before submit
This thread was displayed: 0 times
Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.
For more information about the affected products visit: www.interaktonline.com/Support/
Neil Kendall
05-19-2008 22:04:46 GMT +2
|
Hi I am using an update form to modify a database record. However when the SUBMIT button is pressed I want to modify the contents of one of the form fields before it goes to the database.
Is there any way to simply intercept this data and then process it before it goes to the database?
I am using Developer Toolbox with ASP VB Script and MS SQL 2000 database.
(I did search and found an old post about a similar issue but that was in PHP and I could not really understand it, but I am okay with understanding VB Script)
Thankyou.
|
|
|
Lee Reynolds
05-20-2008 00:00:39 GMT +2
|
Neil --
Try Forms > Advanced > Add Transaction Fields. You should be able to modify any field in the database that is not affected by the form itself. Using this method is a better idea than using hidden fields because its in the database transaction code, not the visible form code.
-LR
|
|
|
Neil Kendall
05-20-2008 00:22:50 GMT +2
|
Thanks
What I am trying to do is that when submit is clicked I want to intercept the value of one of the form fields (that a user has input) and modify it before it is sent to the database.
I am actually wanting to do a search and replace and change £ to £ because of a problem that Cute Editor has, see this post I made at the Cute website http://cutesoft.net/forums/thread/40359.aspx
I am okay with the ASP VB Script for doing the replacing - all I need to know is where to put the code! (ie how to intercept the form field value after submit is clicked and before the value is sent to the database)
Thanks in anticipation
|
|
|
Lee Reynolds
05-20-2008 02:18:01 GMT +2
|
Sorry, I'm not an ASP guy. But it seems logical that if you want to replace a character (£) to £ it may be wise not to send that character at all but to display it next to the field. If that does not work, you might have to go old school and replace (in your pages):
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />b
with
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Hope this helps -LR
|
|
|