PHPackages                             zamudio/nova-custom-form - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zamudio/nova-custom-form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zamudio/nova-custom-form
========================

2125[1 PRs](https://github.com/zamudio-fabian/nova-custom-form/pulls)PHP

Since Apr 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zamudio-fabian/nova-custom-form)[ Packagist](https://packagist.org/packages/zamudio/nova-custom-form)[ RSS](/packages/zamudio-nova-custom-form/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

It is a simple fork to be compatible with Nova 2. The original repository is [HERE](https://github.com/yassipad/nova-custom-form)

Nova Custom Form
================

[](#nova-custom-form)

This package allows you to define entirely customizable components for specific Nova Resources.

Installation
============

[](#installation)

```
composer require zamudio/nova-custom-form

```

Then you need to add the service provider to your config/app.php **after the NovaServiceProvider**:

```
 /*
    |--------------------------------------------------------------------------
    | Autoloaded Service Providers
    |--------------------------------------------------------------------------
    |
    | The service providers listed here will be automatically loaded on the
    | request to your application. Feel free to add your own services to
    | this array to grant expanded functionality to your applications.
    |
    */

    'providers' => [

        ...
        App\Providers\NovaServiceProvider::class,
        ...
        Yassi\NovaCustomForm\NovaCustomFormServiceProvider::class,
        ...
```

Once installed and registered, simply add the CustomFormTrait to your App\\Nova\\Resource:

```
namespace App\Nova;

use Laravel\Nova\Resource as NovaResource;
use Laravel\Nova\Http\Requests\NovaRequest;
use Yassi\NovaCustomForm\CustomFormTrait;

abstract class Resource extends NovaResource
{
   use CustomFormTrait;
    ...
```

Create a new form
=================

[](#create-a-new-form)

This is exactly the same process as for any other Nova Tool, ResourceTool or Field. You can simply use that command in your terminal:

```
php artisan nova:form @vendor/package-name

```

This will create your form component in /nova-components/PackageName. If you've installed the dependencies during the previous process, you can directly go ahead and use:

```
cd /nova-components/PackageName && yarn watch

```

You can modify the Create and Edit components inside **/nova-components/PackageName/resources/js/components** as you like :)

Attach a new form to a resource
===============================

[](#attach-a-new-form-to-a-resource)

The CustomFormTrait adds a static method "form" to your resources and passes the current request as an argument. By default, that function returns null, meaning it will use the default Nova form. You just need to override that function and return a new instance of your custom form.

```
namespace App\Nova;

use Laravel\Nova\Fields\ID;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\Gravatar;
use Laravel\Nova\Fields\Password;
use Vendor\PackageName\PackageName;

class User extends Resource
{
    ...

    /**
     * This method registers the custom form
     * to be used for the User resource.
     *
     * @return PackageName
     */
    public static function form ($request) {
        return new PackageName;
    }

```

You can specify which user or which type of user get access to this custom form:

```
public static function form ($request) {
    return $request->user()->email === 'superadmin@email.fr' ? new PackageName : null;
}

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e4a53aa1efd81ef2827bb5b51e425946e463743c76eca98fae1ac0149dd56a3?d=identicon)[zamudiofabian](/maintainers/zamudiofabian)

---

Top Contributors

[![zamudio-fabian](https://avatars.githubusercontent.com/u/8037394?v=4)](https://github.com/zamudio-fabian "zamudio-fabian (4 commits)")

### Embed Badge

![Health badge](/badges/zamudio-nova-custom-form/health.svg)

```
[![Health](https://phpackages.com/badges/zamudio-nova-custom-form/health.svg)](https://phpackages.com/packages/zamudio-nova-custom-form)
```

###  Alternatives

[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M34](/packages/shipmonk-name-collision-detector)[bostondv/bootstrap-ninja-forms

Adds Bootstrap classes to Ninja Forms

222.2k](/packages/bostondv-bootstrap-ninja-forms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
