Forums

This topic is locked

action attribute in forms

Posted 09 Oct 2002 23:34:55
1
has voted
09 Oct 2002 23:34:55 Isaac Sogunro posted:
Hello you all,

When I create a form in DMX and establish a connection, how can I get the user data entered in a form to get inserted into the database through a different file for process?
Whenever I sellect 'insert record' found in the bindings tab under the "applications" category, and tell it what file I want it to go to after I enter it in the "After inserting, go to" box, it still processes everything in the same initial file. I want it to get inserted in the database through another file, so I can manipulate it myself; if needs be. Can anyone help me please. I don't know what to do. I am stuck.

-Isaac-

Replies

Replied 10 Oct 2002 21:20:32
10 Oct 2002 21:20:32 Ned Frankly replied:
DMX (and UD before it) always does processing on the current page (the Action for the form is always the page you are on). You can still manually tweak within the page if you like, and as long as your changes occur within the 'if submit button was pressed' conditional, your changes will work as planned. If you MUST do custom processing on another page, just make the form submit to your desired page (don't try to do the insert on the current page). One way to pull this off is to go ahead and put the INSERT behavior on the page with your form, then move all of the relevant code to another page. You will have to modify the Form's action to point to the new page as well, and with a little tweaking it should work.

In my experience, 99% of the time this is not necessary - having the Insert/Update processing code on the same ASP page as the form works just fine (and I do some pretty horrendous custom code, including FileSystemObject manipulation, TextStreaming, multiple table updates, etc).

Ned Frankly

Reply to this topic