CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 A better Record Form Header instead of Add/Edit

Print topic Send  topic

Author Message
feha


Posts: 712
Posted: 07/10/2008, 3:12 AM

Many times using Record forms have "Add/Edit" at the form "header" ...
This is not clear enough for non experienced users ...
It should be either ADD or EDIT not both, that can lead to confusion.

Here is my small solution:
Edit your record form TH (table header)
to:
  
                         
<!-- BEGIN Panel PanelAddPage --><td class="th"><strong>{res:add_new_page}</strong></td><!-- END Panel PanelAddPage -->  
                         
<!-- BEGIN Panel PanelEditPage --><td class="th"><strong>{res:edit_current_page}</strong></td><!-- END Panel PanelEditPage -->   

That means you need to add two panel controls ...

in BeforeShow Event (of Record Component) add this code:
  
  if (! $Component->EditMode)  
  {  
     $Component->PanelAddPage->Visible = True;  
     $Component->PanelEditPage->Visible = False;  
  
  }  
  else  
  {  
     $Component->PanelEditPage->Visible = True;  
     $Component->PanelAddPage->Visible = False;  
    
  }  

I have set both panels default visibility to No
For HTML semantic reasons the <strong> should/could be replaced with H1 tags ...

Hope this helps someone, and next CCS release implements this as standard :-)

Enjoy

_________________
Regards
feha

www.vision.to
feedpixel.com
View profile  Send private message
wkempees


Posts: 1679
Posted: 07/10/2008, 5:44 AM

Nice.
Third Panel needed to cater for Review mode, see authorization.
Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.