Memento JavaScript Library: Difference between revisions

Jump to navigation Jump to search
Tag: Reverted
Tag: Manual revert
Line 20: Line 20:
==== entryDefault() ====
==== entryDefault() ====
: Get the Entry object containing the default field values for the entry not yet created. This feature is available specifically and only for the Event '''Creating an entry''' & Phase '''Opening an Entry Edit card'''.
: Get the Entry object containing the default field values for the entry not yet created. This feature is available specifically and only for the Event '''Creating an entry''' & Phase '''Opening an Entry Edit card'''.
:; Result: [[#Object DefaultEntry|'''''DefaultEntry''''' object]]
==== entryDefault(mode) ====
: The entryDefault(mode) method allows setting default values for entries within triggers triggered by the '''Creating an entry''' or '''Updating an entry''' events & '''Phase Opening an Entry Edit''' card. The mode parameter defines when these default values will be applied. The mode parameter can take the following values:
:::* 'edit': Applied during the editing of an existing entry.
:::* 'copy': Applied during the creation of an entry by copying an existing entry.
:::* 'prefill': Applied during the creation of an entry using a template.
:::* 'create': Applied during the creation of an empty entry. (Equivalent to using entryDefault() without arguments).


:; Result: [[#Object DefaultEntry|'''''DefaultEntry''''' object]]
:; Result: [[#Object DefaultEntry|'''''DefaultEntry''''' object]]

Navigation menu