Prefill and Default Value: Beware of Incompatibility

Tags

When you link a block to an attribute in the database, you can enable prefill so that the value from the database is automatically displayed in your block.

In addition, each block can also be configured with a default value.

image

What happens if both options are enabled?

If you configure both:

  • Prefill from the database,
  • and a default value

then the database prefill will always override the default value.

This happens because the tool receives two conflicting instructions and gives priority to the value coming from the database.

Best practices

👉 If you want a default value to always be displayed, make sure to uncheck the option “Prefill value in-app” in the studio editor.