NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: bryce on May 31, 2013, 01:18:25 AM

Title: Validation On Completion Of A Form Field
Post by: bryce on May 31, 2013, 01:18:25 AM
The section on 'Dynamic Forms' in the NetTalk book talks about adding server side code to update the form.  I can manage to update the Value of a field but cannot get the Prompt or Comment to update with new values.  Can anyone tell me how to do this please?
Title: Re: Validation On Completion Of A Form Field
Post by: Bruce on May 31, 2013, 03:55:42 AM
On the client side tab, when you add the field to the list, you specify which parts of the field get updated. The default is "value" but you can turn on "prompt" and "comment" there as well.

cheers
Bruce
Title: Re: Validation On Completion Of A Form Field
Post by: bryce on May 31, 2013, 07:27:03 AM
Thanks Bruce.  I think I am misunderstanding something here.  I have ticked those items but should I be able to change what is displayed in them (ie. different text) when they are refreshed.  If so, what session variable (or otherwise) would I change?
Title: Re: Validation On Completion Of A Form Field
Post by: Bruce on June 01, 2013, 09:20:37 AM
Prompts and comments are generated in the
prompt::fieldname and
comment::fieldname routines .

What I recommend is that you right-click on the procedure, choose "source" and embed whatever you like in those routines before the generated code.

This is one of the few times that you can use a local variable for the prompt and comment, and then in the top of those routines set the local variable to whatever you like.

Typically they are "fixed" values, they don't come from session values - but obviously it all depends on what you set the template prompt to.

cheers
Bruce
Title: Re: Validation On Completion Of A Form Field
Post by: bryce on June 01, 2013, 10:54:56 PM
OK, thank you.