aDaneInSpain / component-creator-issues

A code-free repository for handling issues and feature requests for Component Creator for Joomla
https://www.component-creator.com
11 stars 0 forks source link

Feature Request: Form Builder - Access standard Joomla Layouts #565

Open blueline86 opened 2 years ago

blueline86 commented 2 years ago

Steps to reproduce the issue

Joomla has a number of standard layouts used particularly in admin forms for common fields used in Joomla core components. Using the layouts creates a consistent user experience in different components.

It would get great if these layouts could be accessed in Form Builder. There could be an "Add Layout" button with the below layouts available for selection. The layout can be placed inside a fieldset or tab or above all the fieldsets (which is standard for title_alias). Any fields with names that are in this layout can be displayed underneath it but would be greyed out and can't be moved (as they are placed by the layout).

<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?> places titleor nameand aliasup the top above the field sets like in com_content if the fields are in the component

<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?> 'publish_up', 'publish_down', 'featured_up', 'featured_down', array('created', 'created_time'), array('created_by', 'created_user_id'), 'created_by_alias', array('modified', 'modified_time'), array('modified_by', 'modified_user_id'), 'version', 'hits', 'id'

<?php echo LayoutHelper::render('joomla.edit.global', $this); ?> 'transition', array('parent', 'parent_id'), array('published', 'state', 'enabled'), array('category', 'catid'), 'featured', 'sticky', 'access', 'language', 'tags', 'note', 'version_note',

<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?> metadata - fieldset metadesc metakey

I often implement the publishing and meta like this:


<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
            <div class="row">
                <div class="col-12 col-lg-6">
                    <fieldset id="fieldset-publishingdata" class="options-form">
                        <legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
                        <div>
                        <?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
                        </div>
                    </fieldset>
                </div>
                <div class="col-12 col-lg-6">
                    <fieldset id="fieldset-metadata" class="options-form">
                        <legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
                        <div>
                        <?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
                        </div>
                    </fieldset>
                </div>
            </div>
        <?php echo HTMLHelper::_('uitab.endTab'); ?>

Additional comments

This could be taken a step further and you could allow the user to define a custom layout ie: they enter the path like "joomla.edit.metadata" and it's up to them to make sure that layout exists and works. This would allow someone to make a layout file for their component and use it across multiple forms

sjmdia commented 6 months ago

i wish the same as blueline describes, to add more functionality to the Form Builder like "add Column" instead of fieldset and bootstrap Volumn layout like blueline`s sample and what is Cassiopeia template standard