I can't put the trigger event work... So here is my code:
//fields.yaml
fields:
gallery:
label: Galeria
span: full
oc.commentPosition: ''
prompt: 'Add new item'
type: repeater
form:
fields:
type:
label: 'Select the type of a gallery item'
span: full
type: galleryplusvideoselect
galleryplusvideo:
label: Gallery
span: full
oc.commentPosition: ''
type: galleryplusvideo
hidden: true
trigger:
action: show
field: type
condition: value[image]
//galleryplusvideoselect _widget.htm
file<div data-control="balloon-selector" class="control-balloon-selector">
<ul>
<li data-value="image" <?php if($type == "image") echo 'class="active"'; ?>>Image</li>
<li data-value="video" <?php if($type == "video") echo 'class="active"'; ?>>Video</li>
</ul>
<input type="text" onkeyup="
$(this).trigger('change')" <!-- <--- THIS IS ONLY TO REPRODUCE AN EXAMPLE FROM THE DOCUMENTATION -->
name="<?=$name ?>" value="<?= $type ?>" />
</div>
I tryed to create a simple checkbox and textarea and create that trigger functionality... but it isn't works... I could not found any type of JS "activation" so I don't know that I can to do to put this to work...
via Ivan Dunets