NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Stu on March 02, 2014, 10:03:47 PM
-
Hi Bruce,
Have got a memory form with a local string var on it (is a decent size, 10000).
It's on the form as a "text" type field with Redactor selected.
When I type something in and then click on a button on the form (a custom button), there is nothing in the session value for the field.
Example attached, BasicWithMenu (2).zip gives me this result (is under "Testing!" menu item).
Hope this one is easy!
[attachment deleted by admin]
-
Try: do CompleteForm in that Button-client-side-embed as first line.
Nick
-
Hi Nick,
Thanks for the help!
So.
Putting "do CompleteForm" before my code didn't do anything .. Because I was still calling p_web.GSV('field').
Silly me.
p_web.GetValue('field') holds the value, but p_web.GSV('field') does not!
Bruce! Am guessing that shouldn't be the case? (ie, because it's ticked to send to server, GSV should also hold the value?)
-
In the example the value is set back to loc:String
Nick
-
thanks for the example Stu.
>> When I type something in and then click on a button on the form (a custom button), there is nothing in the session value for the field.
correct. From my test it would seem that immediate validation is not applied to the Redactor field. So the field is not passed to the server, and hence is not in the session queue. (The field is passed when the Save button is pressed, but that's a different issue.)
The Test button you are using does pass all the "current values" on the form to the server, and these are in the Value queue. p_web.CompleteForm will move the Value into the actual variable (loc:field) but not into the session queue.
So for now, you want to access it using p_web.GetValue when the button is pressed.
In NetTalk 8, I've updated Redactor, which in turn now supports the Immediate Validation stuff, so the field would be in the session queue as you originally expected.
Cheers
Bruce
-
Thanks Bruce!