diff options
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/plugins/guide.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index ca951c781..8d85092e7 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -623,7 +623,13 @@ async function register ({ registerVideoField, peertubeHelpers }) { | |||
623 | label: 'My added field', | 623 | label: 'My added field', |
624 | descriptionHTML: 'Optional description', | 624 | descriptionHTML: 'Optional description', |
625 | type: 'input-textarea', | 625 | type: 'input-textarea', |
626 | default: '' | 626 | default: '', |
627 | // Optional, to hide a field depending on the current form state | ||
628 | // liveVideo is in the options object when the user is creating/updating a live | ||
629 | // videoToUpdate is in the options object when the user is updating a video | ||
630 | hidden: ({ formValues, videoToUpdate, liveVideo }) => { | ||
631 | return formValues.pluginData['other-field'] === 'toto' | ||
632 | } | ||
627 | } | 633 | } |
628 | 634 | ||
629 | for (const type of [ 'upload', 'import-url', 'import-torrent', 'update', 'go-live' ]) { | 635 | for (const type of [ 'upload', 'import-url', 'import-torrent', 'update', 'go-live' ]) { |