You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Plugins / Addons
- Dynamically adding mediajce fields
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Hi,
I'm tweaking j2store back-end to make it use mediajce fields in place of their monstrosity, everything kinda works except dynamically added fields (which get cloned and IDs replaced) -- the newly cloned fields don't respond to clicks. Is there a way to intialise them, or is there a "proper" way to dynamically add new mediajce fields to DOM?
Thanks
I'm tweaking j2store back-end to make it use mediajce fields in place of their monstrosity, everything kinda works except dynamically added fields (which get cloned and IDs replaced) -- the newly cloned fields don't respond to clicks. Is there a way to intialise them, or is there a "proper" way to dynamically add new mediajce fields to DOM?
Thanks
A mediajce field is just an extension of a Joomla media field - opening the JCE File Browser instead of the Joomla Media Manager - so it behaves in the same way.
Use a "subform" field, with the mediajce field as the "formsource" - https://docs.joomla.org/Subform_form_field_type
For example, the formsource file could contain:
is there a "proper" way to dynamically add new mediajce fields to DOM?
Use a "subform" field, with the mediajce field as the "formsource" - https://docs.joomla.org/Subform_form_field_type
For example, the formsource file could contain:
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields>
<field
name="image_repeat"
type="mediajce"
mediatype="files"
label=""
description=""
/>
</fields>
</form>
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!