Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HoneyPot::make() #61

Closed
JacobSussan opened this issue Apr 26, 2024 · 2 comments
Closed

HoneyPot::make() #61

JacobSussan opened this issue Apr 26, 2024 · 2 comments

Comments

@JacobSussan
Copy link
Contributor

JacobSussan commented Apr 26, 2024

Honeypot does not work:

public function fields()
{
    return [
        HoneyPot::make(),
        Text::make('name', [
            'required' => true,
            'label' => 'Name',
            'placeholder' => 'Full Name',
        ])
    ]
}

seems like content is null

{"name":"html-snippet-5e4f7d39-1de2-42e1-949f-ff3ff079a86c","options":[],"type":"html","content":null,"attributes":[],"level":null,"instance":{}}

but even if you do

HoneyPot::make([
    'content' => HoneyPot::render()
]), 

it still does not render correctly.. seems like potentially some issue with setSections()?

If you look at the default Scaffold registration form, there is no honeypot being rendered.

Scaffold/app/View/Forms
/RegistrationForm.php

@JacobSussan
Copy link
Contributor Author

HoneyPot::make()->name('honeypot')

seems to fix the issue.

setSections was not finding the field with that name. closing this issue to Scaffold.

@JacobSussan
Copy link
Contributor Author

GrafiteInc/Scaffold#105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant