NetTalk Central

Author Topic: WebForm without browse not saving  (Read 2086 times)

mtabakin

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
WebForm without browse not saving
« on: January 25, 2015, 07:01:36 PM »
I created a NetWebForm using the NT wizard. I've set this NetWebform as the Default Page in the WebServer so it opens immediately when logging onto the site. On the NetWebForm on the Advanced tab I set the Default Form Action as INSERT and also set the Security tab to Allow Inserts. For this NetWebForm I set the URL on Save and the URL on Cancel to an external web page on the internet. The Form Source is a TPS file for now but will be changed to an SQL table in the future, but for now I'm using the TPS for testing. 

Problem is when I press the SAVE button on the Form nothing is saved to the table. In fact, looking at the NetTalk Web Server monitor screen I do not see anything coming from the form when pressing Save, although I see the other fields coming into the server when I tab from field to field entering data into the fields. The Save button seems to be working because the URL on Save is 'triggering", that is, right after pressing the Save button I'm taken to the internet web site I designated. I also know the TPS file is being created because if I remove it, the NetWebForm will create the file the next time. The table has a GUID primary key that is being displayed on the form for testing and is being primed successfully by StringTheory.MakeGUID().

Can't figure out why this wizarded NetWebForm will not save. Attached is the app and dct I'm using for testing. I even tried adding an Access:Jobs.INSERT() statement into the CompleteForm procedure but debugging code shows that procedure is never being called. 

Clarion 9.1.11497 and NetTalk 8.34 and StringTheory 2.14

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: WebForm without browse not saving
« Reply #1 on: January 25, 2015, 09:53:56 PM »
Hi Mike,

>> For this NetWebForm I set the URL on Save ... to an external web page on the internet.

Right, so the user clicks on "save" and the POST is then sent to the Url On Save.
the form is not doing anything when the Save is pressed, because you're not sending the Save to your server, you're sending it to the other server. (You can see this if you look at the log.)

I think what you want to do is leave the Url on Save as it is. Then in the PostInsert routine put

  p_web.Redirect('http://www.dccs.org')     
  p_web.ReplyComplete()


Cheers
Bruce

mtabakin

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: WebForm without browse not saving
« Reply #2 on: January 26, 2015, 10:19:18 AM »
Thanks Bruce, works like I need it to work. You learn something new everyday about how NT works and how it can be used!