PHP Classes

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

Recommend this page to a friend!
  Classes of Manuel Lemos   PHP Forms Class with HTML Generator and JavaScript Validation   smarty/3/plugins/insert.formaddlabelpart.php   Download  
File: smarty/3/plugins/insert.formaddlabelpart.php
Role: Auxiliary script
Content type: text/plain
Description: Smarty 3 plug-in script to insert form input label parts
Class: PHP Forms Class with HTML Generator and JavaScript Validation
HTML forms generation and validation.
Author: By
Last change: Added support to Smarty 3.
Date: 11 years ago
Size: 528 bytes
 

Contents

Class file image Download
<?php

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

function smarty_insert_formaddlabelpart($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->AddLabelPart(array('FOR'=>$params['for']));
    return
'';
}

?>