? Pending

User tests: Successful: Unsuccessful:

avatar ciar4n
ciar4n
15 Oct 2016

Summary of Changes

A PR to add a small amount of styling to repeatable subforms (joomla.form.field.subform.repeatable). Adds some definition between repeated forms and a slight repainting.

Testing Instructions

Create ../modules/mod_login/test.xml to which add the following...

<?xml version="1.0" encoding="UTF-8"?>
<form>
    <fieldset name="sample" class="sample-subform">
        <field name="image" type="media" default="" label="Sample Field 1"  description="Desc1" size="30" />
        <field name="text" type="text" default="" label="Sample Field 2" description="Desc2" />
        <field name="color" type="color" default="#dddddd" label="Sample Field 2" description="Desc2" />
    </fieldset>
</form>

Add the following to the ../modules/mod_login/mod_login.xml file:

<field name="subformtest" type="subform" formsource="modules/mod_login/test.xml" class="advancedSelect" min="0" max="50" multiple="true" layout="joomla.form.field.subform.repeatable" groupByFieldset="true" label="Repeatable Subform" description="Desc" />

Before Patch
repeatable1

After Patch
repeatable2

Test with the various options available (https://docs.joomla.org/Subform_form_field_type)

Documentation Changes Required

None

avatar ciar4n ciar4n - open - 15 Oct 2016
avatar ciar4n ciar4n - change - 15 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2016
Category Administration Templates (admin)
avatar zero-24 zero-24 - test_item - 15 Oct 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 15 Oct 2016

I have tested this item successfully on 34d03a0

Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12419.

avatar coolcat-creations
coolcat-creations - comment - 29 Oct 2016

What about something like this:
image
or this:
image

avatar ufuk-avcu
ufuk-avcu - comment - 29 Oct 2016

I prefer the @coolcat-creations one and especially the full border around the subfields.

avatar widmann-it
widmann-it - comment - 29 Oct 2016

If I look at the three versions I would recommend version 3 version 2 of Elisa

avatar chmst
chmst - comment - 29 Oct 2016

I'd prefer te last example (version2 of coolcat). But with a modification: the remove and add buttons should be together at the top of the box. Or even at the top and at the bottom. Why? Because a subform can be much longer than these examples. So it might be necessary to scroll from the add- to the remove-button.

avatar ciar4n
ciar4n - comment - 29 Oct 2016

Thank you @coolcat-creations

There was a number of reasons why opted for such minimal styling, some of which would be...

  1. Keeping subform fields aligned with non subform fields.
  2. To much styling may make the forms look a little busy if the subform contained a single field which might often be the case.
  3. Extension developers often add their own styling to their extension settings and considered it best practice to give them a relatively clean canvas to build from.

Obviously these are just my own personal opinions and I would be happy to create a PR with your suggestions (personally I like the your 2nd option) if you feel the above points irrelevant.

@chmst True however IMO for the same reason I would nearly go for having the 'add' at the bottom. Some reasons been...

  1. User can visually see the new form been created which would not be the case if the 'add' was at the top of a long subform.
  2. If a user is filling out a number of subforms, the 'add' at the bottom keeps the flow downwards rather than having to scroll back up, click 'add' and then down again after each form is filled.
avatar brianteeman brianteeman - change - 29 Oct 2016
Labels Added: ?
Removed: ?
avatar coolcat-creations
coolcat-creations - comment - 29 Oct 2016

@ciar4n that would be nice if you can do this.
@chmst - yes i have to agree to @ciar4n - when you have the add button at the bottom then you are at the position and in the need to create a new field. I would prefer to have this one at the bottom. And the delete icon at the top because that´s usually the place where you see that you want to delete the item. However if @ciar4n creates a PR with the suggestion we can test the behavior and see if it works good. Thanks everyone!

avatar ciar4n
ciar4n - comment - 30 Oct 2016

I've created an alternative PR (#12634) based on @coolcat-creations second suggestion.

avatar coolcat-creations
coolcat-creations - comment - 14 Nov 2016

I have tested this item successfully on f4a3406

Both tested successful (would prefer the other option though)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12419.

avatar coolcat-creations coolcat-creations - test_item - 14 Nov 2016 - Tested successfully
avatar ciar4n ciar4n - change - 15 Nov 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-11-15 23:35:13
Closed_By ciar4n
avatar ciar4n
ciar4n - comment - 15 Nov 2016

Closed in favor of #12634

avatar ciar4n ciar4n - close - 15 Nov 2016

Add a Comment

Login with GitHub to post a comment