Not a developer? Go to MovableType.com

Documentation

App:Form

Used for application templates that need to express a standard MT application form. This produces certain hidden fields that are typically required by MT application forms.

Attributes:

  • action (optional)

    Identifies the URL to submit the form to. If not given, will use the current application URI.

  • method (optional; default "POST")

    Supplies the form method. "GET" or "POST" are the typical values for this, but will accept any HTTP-compatible method (ie: "PUT", "DELETE").

  • object_id (optional)

    Populates a hidden 'id' field in the form. If not given, will also use any 'id' template variable defined.

  • blog_id (optional)

    Populates a hidden 'blog_id' field in the form. If not given, will also use any 'blog_id' template variable defined.

  • object_type (optional)

    Populates a hidden '_type' field in the form. If not given, will also use any 'type' template variable defined.

  • id (optional)

    Used to form the 'id' element of the HTML form tag. If not specified, the form tag 'id' element will be assigned TYPE-form, where TYPE is the determined object_type.

  • name (optional)

    Supplies the form name attribute. If unspecified, will use the id attribute, if available.

  • enctype (optional)

    If assigned, sets an 'enctype' attribute on the form tag using the value supplied. This is typically used to create a form that is capable of uploading files.

Example:

    <mtapp:Form id="update" mode="update_blog_name">
        Blog Name: <input type="text" name="blog_name" />
        <input type="submit" />
    </mtapp:Form>

Producing:

    <form id="update" name="update" action="/cgi-bin/mt.cgi" method="POST">
    <input type="hidden" name="__mode" value="update_blog_name" />
        Blog Name: <input type="text" name="blog_name" />
        <input type="submit" />
    </form>
Back

Leave a Comment