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.
A yes-no set of buttons styled as normal
Partialy unstyled radio buttons
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
Labels |
Added:
?
|
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.
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 |
Status | Duplicate Report | ⇒ | Closed |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Rel_Number | 16676 | ⇒ | 0 |
Relation Type | Duplicate of | ⇒ |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16695
closed as duplicate Report of #16676, thanks for Report.
Category | ⇒ | com_fields |
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
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.