Memento JavaScript Library: Difference between revisions

Jump to navigation Jump to search
Tag: Manual revert
Line 22: Line 22:


:; Result: [[#Object DefaultEntry|'''''DefaultEntry''''' object]]
:; Result: [[#Object DefaultEntry|'''''DefaultEntry''''' object]]
==== buildDefaultEntry() ====
: The buildDefaultEntry() method is a powerful function designed to facilitate the customization of default field values during the '''Creating an entry''' or '''Updating an entry''' trigger events, specifically in the '''Opening an Entry Edit card''' phase. When used in the "Creating an entry" trigger event, the buildDefaultEntry() method applies default values for new, copied, or prefilled entries.
: '''Properties'''
: The buildDefaultEntry() method allows you to determine the method used by the user to create an entry. Use the following properties for this purpose:
::; buildDefaultEntry().created:  Indicates a new and empty entry.
::; buildDefaultEntry().duplicated: Indicates a duplicate of an existing entry.
::; buildDefaultEntry().prefilled:  Indicates the creation of an entry based on a template.
: '''Usage'''
: The buildDefaultEntry() method provides a fluent interface, allowing you to chain operations and set default field values for an entry. The typical usage pattern involves invoking the set() method on the result of buildDefaultEntry() to specify the field name and its corresponding default value.
:: <source lang="JavaScript">
buildDefaultEntry().set("Field name", "Field value");
</source>


==== exit() ====
==== exit() ====

Navigation menu