Giter Site home page Giter Site logo

nova-wizard's People

Contributors

olliescase avatar silentpatrik avatar wdelfuego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nova-wizard's Issues

File field issue

Hi
Thanks for this package,
The file field is not rendered properly and takes a very large width , that you need to scroll side panel to see the form

Thanks

Getting 403 error after tutorial setup

I tried to setup the wizard as shown in the documentation.
Only thing I changed is the uri in the config file to setup/create-community.
When clicking the link to open the wizard (embed as tool or direct link) I'm receiving 403.

TypeError: Cannot read properties of undefined (reading 'fields')

Originally posted by @adrian-schnell in #3 (comment)

The window remains empty except the navigations. In the console there's this error:
Bildschirmfoto 2023-11-10 um 09 20 09

In the class I copied the demo content:

<?php

namespace App\Nova\Wizard;

use Laravel\Nova\Fields;
use Wdelfuego\NovaWizard\AbstractWizard;

class CreateCommunityWizard extends AbstractWizard
{
    public function wizardViewData(): array
    {
        return [
            'steps' =>
                [
                    'title'  => 'Step 1/2',
                    'fields' => [
                        Fields\Text::make(__('Username'), 'username'),
                        Fields\Text::make(__('Text field'), 'myText'),
                        Fields\Textarea::make(__('Longer text'), 'myLongerText')
                            ->help("You can use Help texts on Nova fields like you're used to"),
                        Fields\Number::make(__('Some number'), 'myNumber')
                            ->rules('required')
                            ->withMeta(['value' => 60])
                            ->min(1)
                            ->step(1),
                    ],
                ],
            [
                'title'  => 'Step 2/2',
                'fields' => [
                    Fields\Text::make(__('Text field 2'), 'myText2'),
                    Fields\Textarea::make(__('Longer text 2'), 'myLongerText2')
                        ->help("You can use Help texts on Nova fields like you're used to"),
                    Fields\Number::make(__('Some number 2'), 'myNumber2')
                        ->rules('required')
                        ->withMeta(['value' => 60])
                        ->min(1)
                        ->step(1),
                ],
            ],
        ];
    }

    public function onSubmit($formData, &$context): bool
    {
        return true;
    }

    public function successViewData($context): array
    {
        return [
            'message' => 'Success! Your Community has been created.',
        ];
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.