Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

Add modifiers to macros for the Dynamic Repeater #7500

Open vernonstinebaker opened 2 months ago

vernonstinebaker commented 2 months ago

Before adding a new feature request, please, make sure you’ve checked:

Please, describe the feature request, making it clear to understand.

The Dynamic Repeater provides a simple and powerful way to work with repeater fields, however it only presents the data in a raw format. For example in reference to users it only outputs the user ID without the option to modify it to a more front-end friendly option like display_name. JetEngine already supports %macro|modifier% in some areas. This feature request is to extend support for this functionality into the Dynamic repeater.

Add an example of where this feature is already implemented.

Macros with modifiers are already supported in Query Builder, Dynamic Visibility settings, the Label field of the Dynamic Link widget/block, the Query Arguments area of the Dynamic Link widget/block, and the Customize field output area of the Dynamic Field widget/block.

Provide a detailed explanation of where this feature should be used, and if there are any alternatives already.

The attached screenshot shows the content of a repeater field displayed in the Dynamic Repeater.

Screenshot 2024-04-30 at 09 28 20

As displayed the information isn't very user-friendly. What I'd like is:

For the initial field, which has values coming from a Glossary, an option like: %accreditation_type|get_lable_by_glossary(glossary_id)%

For the date field, supporting date formatting: %current_date|format% so %accreditation_date|custom|F j, H:i%

and for the final field, convert from User ID to display_name %accrediting_coach|display_name%

The alternative is to create a Listing Item, where callbacks can be used to produce the desired results. The disadvantage of the Listing Item is the requirement to produce and maintain an additional Listing Item that's less intuitive than using the Dynamice Repeater.