Login   Register  
PHP Classes
elePHPant
Icontem

File: smarty/3/plugins/insert.formaddinputpart.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Manuel Lemos  >  Forms generation and validation  >  smarty/3/plugins/insert.formaddinputpart.php  >  Download  
File: smarty/3/plugins/insert.formaddinputpart.php
Role: Auxiliary script
Content type: text/plain
Description: Smarty 3 plug-in script to insert form input parts
Class: Forms generation and validation
HTML forms generation and validation.
Author: By
Last change: Added support to Smarty 3.
Date: 1 year ago
Size: 516 bytes
 

Contents

Class file image Download
<?php

/*
 * insert.formaddinputpart.php
 *
 * @(#) $Header: /opt2/ena/metal/forms/smarty/3/plugins/insert.formaddinputpart.php,v 1.1 2011/02/07 07:09:35 mlemos Exp $
 *
 */

function smarty_insert_formaddinputpart($params, &$smarty)
{
    
$form $smarty->getTemplateVars('form');
    if(!IsSet(
$form)
    || !
is_a($form'form_class'))
        throw(new 
Exception('the "form" template variable was not assigned to the form object'));
    
$form->AddDataPart($params['data']);
    
$form->AddInputPart($params['input']);
    return 
'';
}

?>