NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on November 28, 2008, 02:28:21 AM

Title: Embed point for all fields
Post by: Alberto on November 28, 2008, 02:28:21 AM
Hi,
I need to run a routine each time any control is accepted.
Now I´m adding the code in each control in the 2Validate::ControlName Routine
I want to put the code in a single embed.
Which embed must I use?
Thanks
Alberto
Title: Re: Embed point for all fields
Post by: Bruce on November 28, 2008, 09:53:45 PM
Hi Michelis,

I recommend you make a new routine containing the code, and then just add a call to that routine to the various form fields "validate" routines.

cheers
Bruce
Title: Re: Embed point for all fields
Post by: Alberto on December 01, 2008, 05:16:22 AM
Hi Bruce,
THats what Im doing...
How About a template check to call a Single routine from each field?
Cheers
Alberto
Title: Re: Embed point for all fields
Post by: Alberto on December 01, 2008, 05:25:46 AM
Forgot to mention... they are 300 (three hundred) fields!
Title: Re: Embed point for all fields
Post by: Poul on December 01, 2008, 07:39:55 AM
i have often thought it would be nice to have either a generic routine or a tick box on each field to call a generic routine, (perhaps conditional)

I just completed a project where I need to call the same recalc routine for each field, and well there were not 300  fields (yuck)  I did have a lot of pasting the same "do recalc_rtn" code. Felt like a template would save some time...