# Wishlist of future CB input-types

**URL:** <https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245>\
**Category:** ContentBlocks\
**Created:** [March 13, 2018, 3:41pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245 "2018-03-13T15:41:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian-marinescu](https://forum.modmore.com/user_avatar/forum.modmore.com/sebastian-marinescu/32/252_2.png) [@sebastian-marinescu](https://forum.modmore.com/u/sebastian-marinescu)\
**Post date:** [March 13, 2018, 3:41pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/1 "2018-03-13T15:41:08Z")

</div>

Hi, I just want to log some ideas for possible CB input-types.

- Image+ Cropping
- MIGX-TV as input type

To be continued…

---

<div class="post-metadata">

**Author:** ![jonleverrier](https://forum.modmore.com/user_avatar/forum.modmore.com/jonleverrier/32/146_2.png) [@jonleverrier](https://forum.modmore.com/u/jonleverrier)\
**Post date:** [March 13, 2018, 3:47pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/2 "2018-03-13T15:47:30Z")

</div>

A better table input that has the ability to add thead (like the one that comes with redactor. this is essential if you want to add any dynamic table sorting.

more ideas to come!

---

<div class="post-metadata">

**Author:** ![degoya](https://forum.modmore.com/user_avatar/forum.modmore.com/degoya/32/94_2.png) [@degoya](https://forum.modmore.com/u/degoya)\
**Post date:** [March 14, 2018, 11:17am UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/3 "2018-03-14T11:17:23Z")

</div>

Yes, a Cropping tool with predefined image ratios would be a great addon.  
Or maybe something like a responsive image where you can select a part of the image for each defined breakpoint.

i’d also like to see a horizontal repeater, that can be used for sliders and other horizontal elements. then the backend could reflect the frontend a bit more.

Also a Google Maps Input Type could be a plus.

A Resource Select input, i already wrote one as extra for CB but i’d like to see something like this in the core of CB.

---

<div class="post-metadata">

**Author:** ![jonleverrier](https://forum.modmore.com/user_avatar/forum.modmore.com/jonleverrier/32/146_2.png) [@jonleverrier](https://forum.modmore.com/u/jonleverrier)\
**Post date:** [April 20, 2018, 8:53am UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/4 "2018-04-20T08:53:19Z")

</div>

A field that supports web video (mp4, ogv, webm) which would be handy for setting up video backgrounds. at the moment, i’m using a textfield with the path to the video files.

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [May 20, 2018, 8:48pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/5 "2018-05-20T20:48:37Z")

</div>

Image cropper is in the works.

---

<div class="post-metadata">

**Author:** ![enigmatic\_user](https://forum.modmore.com/user_avatar/forum.modmore.com/enigmatic_user/32/408_2.png) [@enigmatic\_user](https://forum.modmore.com/u/enigmatic_user)\
**Post date:** [May 27, 2018, 10:28pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/6 "2018-05-27T22:28:30Z")

</div>

A simple type for adding instructions for the editor (without any input field) would be nice. There should be room for more than a short sentence.

---

<div class="post-metadata">

**Author:** ![sebastian-marinescu](https://forum.modmore.com/user_avatar/forum.modmore.com/sebastian-marinescu/32/252_2.png) [@sebastian-marinescu](https://forum.modmore.com/u/sebastian-marinescu)\
**Post date:** [November 22, 2018, 1:58pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/7 "2018-11-22T13:58:39Z")

</div>

A “TV”-Field-Type, which loads any given TV 🙂

---

<div class="post-metadata">

**Author:** ![sebastian-marinescu](https://forum.modmore.com/user_avatar/forum.modmore.com/sebastian-marinescu/32/252_2.png) [@sebastian-marinescu](https://forum.modmore.com/u/sebastian-marinescu)\
**Post date:** [October 21, 2022, 10:07pm UTC](https://forum.modmore.com/t/wishlist-of-future-cb-input-types/1245/8 "2022-10-21T22:07:56Z")

</div>

Hi @jonleverrier, I know a little bit late, but just wanted to share with you my solution to Web-Video files on an element. My “Hero-Video” has multiple video settings, for Desktop/Mobile and their respective formats, which are dropdowns:

![image](https://forum.modmore.com/uploads/default/original/1X/484ee2830dfa6a303b09f91608ae830e3e5b8c25.png)

The options are a processed snippet-call, which filters on the relevant extension:

```
[[GetMediaFilesOptions? 
    &extensions=`webm`
]]

```

The snippet looks like this:

```auto
<?php
/**
 * GetMediaFilesOptions
 *
 * Copyright 2021 by Sebastian G. Marinescu <info@sebastian-marinescu.com>
 * Website is a proprietary package. All rights reserved.
 *
 * @author Sebastian G. Marinescu
 * @copyright Sebastian G. Marinescu
 * @package website
 *
 */
 
$output = 'No files';
$root = (string) $modx->getOption('root', $scriptProperties, null, 'media/');
$delimited = (boolean) $modx->getOption('delimited', $scriptProperties, false, true);
$extensions = (string) $modx->getOption('extensions', $scriptProperties, null);

$path = $modx->getOption('base_path').$root;
if (substr($path,-1,1) != '/') { $path .= '/'; }
if (!is_dir($path)) { return $output; }

$iter = new RecursiveIteratorIterator(
    new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
    RecursiveIteratorIterator::SELF_FIRST,
    RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
);

$paths = array();
foreach ($iter as $path => $file) {
    if (!$file->isReadable()) continue;
    if ($file->isDir()) continue;

    $basename = $file->getFilename();
    if ($basename == '.gitkeep') continue;
    
    if (!empty($extensions)) {
        $filetypes = explode(',', trim(str_replace(' ', '', $extensions)));
        $filetype = pathinfo($file, PATHINFO_EXTENSION);
        if (!in_array(strtolower($filetype), $filetypes)) {
            continue;
        }
    }
    
    $file = str_replace($modx->getOption('base_path'), '', $file);
    $paths[] = "{$file}";
}

asort($paths);

if ($delimited) {
    array_unshift($paths, "Keine Auswahl==");
    $output = implode("||", $paths);
} else {
    array_unshift($paths, "Keine Auswahl=");
    $output = implode("\n", $paths);
}

return $output;

```

Then your editors won’t have to type in a path, but can just select the video:

![image](https://forum.modmore.com/uploads/default/original/1X/410b4d1ff940647db58339f095aa5c3ed46c2e88.png)

Have fun!
