Plugin Framework Function openForm()

public final function openForm(
$onSubmit = '', $extraAttributes = '', $action = false, $scrollToTopOfSlot = false, $fadeOutAndIn = true, $usePost = true
)

Summary

Opens a form, that will submit by reloading the Plugin via AJAX.

Where You Can Use It

Can be used in methods called by plugins. From Zenario 7.0.0 onwards.

Description

Allows you to have a form on your Plugin, submit the form, handle the result and then reload your Plugin using AJAX. Works by submitting to a hidden iframe.

Return Value

The HTML needed to open the form.

Example

echo 
    $this->openForm().
        $this->remember('id', 7).
        $this->phrase('_ENTER_YOUR_NAME').
        '<input type="text" name="name"/>'.
    $this->closeForm().

A simple form, with a hidden field and a text field.