PEAR Manual
Prev |  | Next

# <INPUT NAME="name">

<INPUT NAME="name"> -- creates PHP variable for input values

## Synopsis

``Usage` (<INPUT NAME="name">)`

## Description

fills in the form with values based on the form name and the tag name. If flexyignore is used, it is left alone (or if the body or form has a flexyignore tag it will be left alone).

## Example

Example 41-1. Using an element to change a template.
    $form = new HTML_Template_Flexy();
    $form->compile($this->masterTemplate);

    // create an instance (note you dont have to specify any details..)

    $elements['test'] = new HTML_Template_Flexy_Element;

    // change an attribute
    $elements['test']->attributes['class'] = 'bold';

    // sets the value
    $elements['test']->setValue('Fred');

    // wrap it with something
    $elements['test']->prefix = '******';
    $elements['test']->suffix = '!!!!!!';

    $form->output(new StdClass, $elements);

    // in the example below, the new data you have added is to the existing attributes

Example 41-2. template example
    <BODY>
      <FORM name="XXXX" flexy:ignoreonly="yes">

        <INPUT name="test" length="12">

      </FORM>
    </BODY>

Example 41-3. compiled template
    <BODY>
      <FORM name="XXXX">

        <?php echo $this->elements['test']->toHtml();?>

      </FORM>
    </BODY>

Example 41-4. output from the Template
    <BODY>
      <FORM name="XXXX">

        ******<INPUT name="test"  length="12" class="bold" value="Fred">!!!!!!

      </FORM>
    </BODY>

Prev | Home | Next
<FORM NAME="name" | Up | <TEXTAREA NAME="name">