OnFormSave

Description

Called after a form is saved. It allows the developer to either manipulate POST result from a form POST or store custom form data from onFormDisplay event.

Params

  • form name | name of the form saved.

Example

function onFormSave( $form_name ) 
{
 	if( $form_name == 'jsform-profile-privacy' )
 	{
 		$myvar_1 = JRequest::getVar('custom1');
 		$myvar_2 = JRequest::getVar('custom2');
 
 		/* the plugin is responsible in storing this var in database 
 		   or using it in any way it like
 		*/
	}
	return ;
}


Note

The plugin is free to do whatever it want with the POST var. In most cases, it might want to store it in the database. JomSocial does not automatically save any custom form data.