Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Required Fields
Marc Johnson
Posts: 252
 
Required FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Oct 07 2:09 PM
I'd like to do more than the basic '*' when a field is required. I like to change the field color (for text and memos) to a light yellow and change the hint. I'm assuming that I'd do this with a VBscript that I'd call, but how could I get this to be default behavior for all items with the .required set to true, without coding every single field? Or is this even possible?

6.2.6 (for now) btw
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Required FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Oct 07 3:07 PM
You can easily do this by iterating through the controls collection. You can see an example of this here: http://saleslogixblog.com/rfarley/archive/2004/07/26/925.aspx

You can also gleam some useful info from the article covering how to generically set a form to readonly here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=70

So, your code will look something like this:

Dim i

On Error Resume Next

For i = 0 To ControlCount - 1
If TypeName(Controls(i)) = "Edit" Then
If Controls(i).Required Then Controls(i).Color = Application.BasicFunctions.StringToColor("Highlight")
End If
Next


I didn't test that code or anything, but give it a try.
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Required FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Oct 07 7:27 AM
Hmmm. I can see applying this to a few form where we have required fields.

Thanks,
John G.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Required FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Oct 07 10:38 AM
Quote:
Originally posted by John Gundrum

Hmmm. I can see applying this to a few form where we have required fields.

Thanks,
John G.


Yeah, I would have to agree. I'd not though of this before, but it would make sense to wrap up as a generic script and just add to every form.

-Ryan
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Required FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Oct 07 9:34 AM
it would make sense to wrap up as a generic script and just add to every form


I wasn't even think about that when I made the comment! An excellent idea to say the least!

Will have to work on that.

John G.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/20/2025 11:20:23 PM