NetTalk Central

Author Topic: Manually saving form contents  (Read 3611 times)

hkalmbach

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Email
Manually saving form contents
« on: October 07, 2020, 07:09:12 AM »
Hello,

I have a NetForm, based on Memory, and do updates to database manually with a button, calling the form itself with an action parameter. This action parameter is evaluated on GenerateForm, and 
gets the contents by GSVs on the form fields, then does the save action.
This works well beside one point: there is only one text field and the save button on the form. If I change the text WITHOUT leaving the field by tab the entered content is not available by a GSV.
If I first leave the field and then press my save button the text is available.

Can I do something to get the text without accepting the textfield, that means write text and directly press SAVE?

Thanks a lot

Cheers
Heinz

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Manually saving form contents
« Reply #1 on: October 10, 2020, 11:01:46 AM »
I think I understand what you are doing.

If you can, post a screenshot of the form in question.

Thanks.
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Manually saving form contents
« Reply #2 on: October 11, 2020, 06:42:31 PM »
>> If I change the text WITHOUT leaving the field by tab the entered content is not available by a GSV.

correct. When you goto another field (pressing tab, clicking a button) then the new value in the text field is sent to the server, which in turn writes it to the session.

When you press the button a Post is sent to the server for action.

So when you go directly from the text field to the button, two separate requests are sent to the server. These are processed on different threads. In your case you are seeing the button code complete before the text value is written to the session.

I suspect if you inspect the Post in the Log you'll see the text value is being sent through as a Value. So you can access it there with p_web.GetValue, instead of p_web.GetSessionValue.

cheers
Bruce