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

Default field value of a hidden field in a repeatable section always the same value #6340

Open
maul75 opened this issue Apr 8, 2024 · 1 comment

Comments

@maul75
Copy link

maul75 commented Apr 8, 2024

  • Laravel Version: 10.48.4
  • Nova Version: 4.33.1
  • PHP Version: 8.3.2
  • Database Driver & Version:
  • Operating System and Version: #.#
  • Browser type and version: #.#
  • Reproduction Repository: https://github.com/###/###

Description:

If I set a hidden field in a repeatable item with a random string as default value, I always have the same value in all repeatable fields?

Hidden::make('hash')->default(Str::random(8))

@maul75
Copy link
Author

maul75 commented Apr 9, 2024

I solved this currently with setting this values with the afterCreate and afterUpdate hooks.

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

No branches or pull requests

2 participants