Framework  3.9
ValidateTabSet Class Reference

When the data entry interface contains multiple tabs (pages) that the user can move around freely (e.g., not required to complete tab c before moving on to tab d) then we validate on the final submit tab. More...

Public Member Functions

 ValidateTabSet ()
 
 Validate ()
 Called when user clicks submit: validate each tab page and redirect to first page that is invalid or returns true. More...
 
 warning ()
 Called from summary view class for each section if the section is invalid. More...
 
 message ()
 Show the validation issue/error as an informative message instead of a warning. More...
 
 writeScript ()
 When system returns user to a tab b/c not valid or completed, show a popup message for the error. More...
 

Public Attributes

 $msg
 

Detailed Description

When the data entry interface contains multiple tabs (pages) that the user can move around freely (e.g., not required to complete tab c before moving on to tab d) then we validate on the final submit tab.

The warning message is called from the final tab's summary view display for each section and on the tab page the user is redirected to if they attempt to submit when there is an error.

E.g., user does not complete grant application. On the view summary section "Grant Application"

we write warning: "You must complete the grant application"

Author
Janice Gallant for Sonjara, Inc.

5/3/2011

Definition at line 1726 of file validation.inc.

Member Function Documentation

◆ message()

ValidateTabSet::message ( )

Show the validation issue/error as an informative message instead of a warning.

Definition at line 1776 of file validation.inc.

1777  {
1778  if($this->msg)
1779  {
1780  echo "<p>{$this->msg}</p>\n";
1781  }
1782  }

◆ Validate()

ValidateTabSet::Validate ( )

Called when user clicks submit: validate each tab page and redirect to first page that is invalid or returns true.

Definition at line 1738 of file validation.inc.

1739  {
1740  }

◆ ValidateTabSet()

ValidateTabSet::ValidateTabSet ( )

Definition at line 1730 of file validation.inc.

1731  {
1732  }

◆ warning()

ValidateTabSet::warning ( )

Called from summary view class for each section if the section is invalid.

The div must be an id for the background image to show - does not work for css classes.

Definition at line 1764 of file validation.inc.

1765  {
1766  if($this->msg)
1767  {
1768  echo "<div id='warning'>{$this->msg}</div>\n";
1769  }
1770  }

◆ writeScript()

ValidateTabSet::writeScript ( )

When system returns user to a tab b/c not valid or completed, show a popup message for the error.

Definition at line 1789 of file validation.inc.

1790  {
1791  $msg = stripHTML($this->msg);
1792  if($msg)
1793  {
1794 
1795 $script .= <<<ENDSCRIPT
1796 <script type="text/javascript">
1797 window.addEvent('domready', function()
1798 {
1799  alert('$msg');
1800 });
1801 </script>
1802 ENDSCRIPT;
1803  }
1804  return $script;
1805  }
stripHTML($text)
Definition: functions.inc:847

Member Data Documentation

◆ $msg

ValidateTabSet::$msg

Definition at line 1728 of file validation.inc.


The documentation for this class was generated from the following file: