• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get list of custom fields from collectionSettings?

Community Beginner ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

Hi,

Please could you help me with such an issue.

In Flicker plugin we have such code snippet:

function publishServiceProvider.viewForCollectionSettings( f, publishSettings, info )

local prefs = LrPrefs.prefsForPlugin()

local collectionSettings = assert( info.collectionSettings )

It is used for customization of Published Collection creation form, so we can add some fields in to the 'collectionSettings' table.

For example:

f:group_box {

        title = LOC 'Event Settings',

        size = 'regular',

        fill_horizontal = 1,

        bind_to_object = assert(collectionSettings),

f:edit_field {

                    alignment = 'left',

                    width = 180,

                    value = bind 'event_name',

                    immediate = true,

                },

f:edit_field {

                    alignment = 'left',

                    width = 180,

                    immediate = true,

                    value = bind 'event_date',

                },

I have a lot of this custom fields (bind 'event_name', bind 'event_date', etc).

Please help me how to get list of them or iterate through all of them.

p.s.: I need to check all these fields in my observer function, where this collection is passed.

for example: collectionSettings:addObserver('event_name', checkFields)

TOPICS
SDK

Views

371

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation