OctoberCMS: Trigger events doesn't work
After reading this (and others...) article (link) on documentation I could not find an issue from my side...
I can't put the trigger event work... So here is my code:
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]
<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 outside of a repeater... 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...
Get rid of
hidden: true. The trigger
action: show property will automatically hide your field, there is no need to double hide it. Cross posted in OctoberCMS issue repository
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?