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

Can't use default value #6

Closed
coroo opened this issue Jun 7, 2020 · 2 comments
Closed

Can't use default value #6

coroo opened this issue Jun 7, 2020 · 2 comments

Comments

@coroo
Copy link

coroo commented Jun 7, 2020

Hi,

thank you for this cool package. Actually, I have problem when using hiddenfield with default value.

use Outhebox\NovaHiddenField\HiddenField;

HiddenField::make('debit_kredit', 'debit_kredit')->default('kredit'),

the error in my app looks like this:
Screen Shot 2020-06-07 at 12 47 04

@coroo
Copy link
Author

coroo commented Jun 7, 2020

Ok, found the issue.

After check this file: https://github.com/MohmmedAshraf/nova-hidden-field/blob/master/src/HiddenField.php#L22 , the default value can be called as:

use Outhebox\NovaHiddenField\HiddenField;

HiddenField::make('debit_kredit', 'debit_kredit')->defaultValue('kredit'),

Thank you.

@MohmmedAshraf
Copy link
Owner

Thank you @coroo I've update this in Readme.md file also so new user will never face this issue.

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

2 participants