NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Stu on March 02, 2014, 10:03:47 PM

Title: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post 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]
Title: Re: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post by: Nick on March 03, 2014, 04:45:35 AM
Try: do CompleteForm in that Button-client-side-embed as first line.

Nick
Title: Re: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post by: Stu on March 03, 2014, 01:39:20 PM
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?)
Title: Re: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post by: Nick on March 03, 2014, 01:50:48 PM
In the example the value is set back to loc:String

Nick
Title: Re: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post by: Bruce on March 03, 2014, 10:57:56 PM
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
Title: Re: Redactor not sending to server for Local Field on Memory Form (eg attached)
Post by: Stu on March 04, 2014, 02:41:00 AM
Thanks Bruce!