NetTalk Central

Author Topic: Client Side options on Form  (Read 6882 times)

Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Client Side options on Form
« on: July 09, 2007, 05:20:14 PM »
A field on a form has a tab for "Client Side" options, but I can't quite get my head around the details.

What is the difference between:
 
  •   Send new value to server
[ServerCode] button
  Refresh
  • Value

  Reset Other Fields

Alan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Client Side options on Form
« Reply #1 on: July 09, 2007, 11:51:43 PM »
Send new value to server causes the field to be sent to the server when it is completed. This switch is here because in _some_ cases you'll be receiving the new value, but not actually sending anything back.

Refresh is somewhat redundant now. It's the same as doing a Reset Fields, but on itself. I may try and take it out at some point, but obviously I need to be careful that I don't break existing programs. Using any of these implicitly sets "Send new value to server".

Reset Other Fields implicitly sets "Send new value to server".
And obviously this one is the most flexible in that it allows you to update any part of the form when the field changes.

Cheers
Bruce

Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Client Side options on Form
« Reply #2 on: July 10, 2007, 01:27:52 PM »
Bruce,

SO just to check.
The point in "send new value to server" is that the value is now stored in the sessionqueue, and a page reload will mean the data is not lost.

Alan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Client Side options on Form
« Reply #3 on: July 10, 2007, 10:12:43 PM »
Hi Alan,

That's part of it, yes. Although the values can also be moved into the session queue in other ways (for example if you press a lookup button).

The primary reason for having the feature in the first place is so that you can "respond" based on what the user has entered.

For example, you can do immediate validation.
Or you can hide / unhide other fields on the form.
Of you can change the values of other fields. (For example, turn this on, means that thing over there gets turned off.)
And so on.

By default, for example, if you type a code into a lookup field (ie enter the code directly, don't click the lookup button) then the new value is sent to the server, and the server sends back the appropriate description in the comment field.
(Tip: try typing the _description_ into the code field and see what happens...)

Cheers
Bruce

Bram Klootwijk

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: Client Side options on Form
« Reply #4 on: July 18, 2007, 01:29:35 PM »
Hi Bruce,

this is not working for a text field. I need this to pass it to another form....

Greetings,
Bram


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Client Side options on Form
« Reply #5 on: July 18, 2007, 11:47:20 PM »
Hi Bram,

Can you explain in a little more detail...

a) does the feature work sending a text field to the same form?

b) what do you have in mind with sending it to another form? Do you want the initial form to "complete" when they change the text field?

Cheers
Bruce

Bram Klootwijk

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: Client Side options on Form
« Reply #6 on: July 19, 2007, 10:29:52 AM »
Hi Bruce,

The field is used to fill shipping-comments. I want to save this because i use it in the check-out which is 3 forms away from the form in which it is filled  (form 1: customerdetails -> form2: shipping details ->form3: chekout). I navigate through the forms with link-buttons.
In form1 1 have two fields: 1 reference field (type string). This works fine whith the "send new value..." to save the value in the session-queue. The other field, shipping-comments (type text) does not save the value in the session-queue. When i change the type to string, then it works ok. So i think the "Send new value ..." does not work with type text-fields....

Greetings,
Bram

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Client Side options on Form
« Reply #7 on: August 03, 2007, 03:32:49 AM »
Hi Bram

Yes, there was a problem with dynamic Text fields. I've fixed this for 4.29.

Cheers
Bruce



ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: Client Side options on Form
« Reply #8 on: September 14, 2007, 07:27:57 PM »
<SNIP!>
The primary reason for having the feature in the first place is so that you can "respond" based on what the user has entered.
For example, you can do immediate validation.
Or you can hide / unhide other fields on the form.
Of you can change the values of other fields. (For example, turn this on, means that thing over there gets turned off.)
And so on.
<SNIP!>

Is this something new in 4.29?  Hiding and Unhiding seems to occur (in .28) during the GenerateForm routine not in the Field Value routines.
I am trying to make things disappear and I can make them readonly or not but not hide and unhide unless I click reload.
Is there a way to reload the current page when a field changes? I have a dropdown that I want to use to control what appears on subsequent tabs.

Thanks Much,
Chris C.
Real programmers use copy con newapp.exe

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: Client Side options on Form
« Reply #9 on: October 30, 2007, 05:33:58 PM »
Apologies, Bruce.
The field controls do work if you use the hide condition rather than the show condition.
And it is the tabs that get drawn during the generatepage routine so you can't hide and unhide Tabs directly.

Chris
Real programmers use copy con newapp.exe