nova-issues icon indicating copy to clipboard operation
nova-issues copied to clipboard

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

Open maul75 opened this issue 10 months ago • 1 comments

  • 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 avatar Apr 08 '24 19:04 maul75

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

maul75 avatar Apr 09 '24 04:04 maul75