Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Extend Plesk Forms

 
extensions guideimplement uiintegrate to plesk uiplesk features available for extensionsextensions

Plesk SDK API allows you to extend Plesk forms with your own content.
The hook enables embedding controls from an extension into any Plesk
form, for example:

  • The “Git deploy section” on the domain creation screen.
  • Ruby / Python applications on the domain creation screen.
  • The “Social Accounts” link in the profile.
  • Two-factor authentication in profile.

The hook is designed to append sub forms from all extensions during the
rendering of the form. Instances of
pm_Form_SubForm
can be used, but it is not required.

Note: Only Zend forms (those with URL starting with /smb/ and
/admin/) are supported.

The life cycle of every Plesk form consists of 3 stages:

  • init: add elements with initial values.
  • isValid: check validators on each element, an overriden method
    could prevent or extend validation.
  • process: perform actions, save new values, etc.

Each stage will cause the execution of the corresponding method in the
sub form. To define which form should be handled by the hook, arguments
are passed in the hook: $controller, $action, and $formId.

Examples

The hook should be implemented in plib/hooks/Form.php

class Modules_Git_Form extends pm_Hook_Form
{
    public function getSubForms($controller, $action, $formId)
    {
        if (in_array($formId, [static::FORM_CREATE_SUBSCRIPTION, static::FORM_CREATE_CUSTOMER])) {
            $subForm = new AddWithDomain(['context' => [
                'isSubscriptionCreation' => true,
            ], 'moveBefore' => 'subscription-subscriptionInfo']);
        } elseif (in_array($formId, [static::FORM_CREATE_DOMAIN, static::FORM_CREATE_SUBDOMAIN])) {
            $subForm = new AddWithDomain(['context' => [
                'isDomain' => static::FORM_CREATE_DOMAIN === $formId,
                'isSubscriptionCreation' => false,
            ], 'moveAfter' => 'hostingSettings']);
        } else {
            return [];
        }
        return ['git' => $subForm];
    }
}
Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Getting Started With Plesk Extensions & Tools

Read More »

The Plesk WP Toolkit 5.6 Release – What’s New

Read More »

Podcast | Using the Right eCommerce Tools with Joerg Strotmann

Read More »
Knowledge Base

Available Licensing Models – Freemium Extensions

Read More »

Testing Extensions

Read More »

Plesk Features Available for Extensions

Read More »

Issuing Custom Licenses for Extensions

Read More »

Hosting Wiki

  • GIT
  • GitHub
  • PhpMyAdmin
  • phpPgAdmin
  • Ruby On Rails
  • Python
  • PHP
  • Plesk
  • URL
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family