NetTalk Central

Author Topic: Redactor not sending to server for Local Field on Memory Form (eg attached)  (Read 3802 times)

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
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]
Cheers,

Stu Andrews

Nick

  • Full Member
  • ***
  • Posts: 118
    • View Profile
    • Email
Try: do CompleteForm in that Button-client-side-embed as first line.

Nick

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
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?)
Cheers,

Stu Andrews

Nick

  • Full Member
  • ***
  • Posts: 118
    • View Profile
    • Email
In the example the value is set back to loc:String

Nick

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
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

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Thanks Bruce!
Cheers,

Stu Andrews