PHPackages                             wpjscc/wn-popupform-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wpjscc/wn-popupform-plugin

ActiveWinter-plugin

wpjscc/wn-popupform-plugin
==========================

13PHP

Since Sep 4Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/wpjscc/wn-popupform-plugin)[ Packagist](https://packagist.org/packages/wpjscc/wn-popupform-plugin)[ RSS](/packages/wpjscc-wn-popupform-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PopupForm Plugin
================

[](#popupform-plugin)

The PopupForm plugin for WinterCMS provides a convenient way to handle form submissions within popup modals. This plugin extends the functionality of the FormController behavior to support popup forms.

Requirements
------------

[](#requirements)

```
php artisan winter:util compile js

```

Installation
------------

[](#installation)

To install this plugin, add it to your WinterCMS project using Composer:

```
composer require wpjscc/wn-popupform-plugin -vvv
```

Usage
-----

[](#usage)

### Traits

[](#traits)

The `PopupFormTrait` provides methods to handle form submissions and refresh the UI accordingly.

#### Methods

[](#methods)

- `create_onSave($context = null)`: Handles the save action for the create form.
- `update_onSave($recordId = null, $context = null)`: Handles the save action for the update form

### Behaviors

[](#behaviors)

The `PopupFormController` behavior extends the base ControllerBehavior to support popup forms.

#### Methods

[](#methods-1)

- `onCreateForm($context = null)`: Renders the create form in a popup.

```
class Posts extends Controller
{
    use \Wpjscc\PopupForm\Traits\PopupFormTrait;

    public $implement = [
       ...
        \Wpjscc\PopupForm\Behaviors\PopupFormController::class,
    ];
}
```

```
