?
avatar wigman27
wigman27
15 Jun 2017

Steps to reproduce the issue

Hi,

I have found a problem with the new subforms multiple option.

Create subform field with a "yes-no" set of radio buttons.

When adding a row the radio buttons will not style.

Expected result

A yes-no set of buttons styled as normal

Actual result

Partialy unstyled radio buttons

System information (as much as possible)

Additional comments

I have narrowed it down to a JavaScript issue. I think it is because the radio buttons don't exist in the DOM until you press the "add" button to create a new row.

The script file to create the yes-no styling only runs on document ready and doesn't run again. Hence not applying the click event or "btn" classes

avatar wigman27 wigman27 - open - 15 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Jun 2017
avatar mvanvu
mvanvu - comment - 15 Jun 2017

The same problem #16676 but I think it depends on the template isis/js/template.js. So, I have tried to resolve it on template.js. Unluckily, it looks like has some conflict with cms.js.

avatar wigman27
wigman27 - comment - 15 Jun 2017
	Yes,

I have got around it as I am using the subform field as a baseline to create my own custom field.
I am using the Isis template JavaScript in another function that fires each time I add a row.
Thanks
Lee

On Thu, Jun 15, 2017 at 12:49 PM +1000, "Mai Vu" notifications@github.com wrote:

The same problem #16676 but I think it depends on the template isis/js/template.js. So, I have tried to resolve it on template.js. Unluckily, it looks like has some conflict with cms.js.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Jun 2017
Status New Duplicate Report
Closed_Date 0000-00-00 00:00:00 2017-06-15 03:54:07
Closed_By franz-wohlkoenig
Rel_Number 0 16676
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jun 2017
Status Duplicate Report Closed
Closed_By franz-wohlkoenig joomla-cms-bot
Rel_Number 16676 0
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - close - 15 Jun 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 15 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Jun 2017

closed as duplicate Report of #16676, thanks for Report.


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Jun 2017
Category com_fields
avatar dgt41
dgt41 - comment - 27 Jan 2018

The script file to create the yes-no styling only runs on document ready and doesn't run again

True! Unfortunately J3.x doesn't have any js event system which means the subform script needs to watch for DOM changes and apply any extra needed functionality manually. This is fixed in J4 by moving all the fields to Custom Elements (meaning each field will be responsible for it's own functionality). Back to J3.x: there needs to be an observer for each new row added and then try to apply the btn btn-group functionality manually

avatar Quy
Quy - comment - 28 Jan 2018

@dgt41 Is #11299 the same issue?

Add a Comment

Login with GitHub to post a comment