Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Is Bloqs compatible with Channel Forms?

Status Resolved
Add-on / Version Bloqs 4.0.5
Severity
EE Version 4.3.5

DSite

Oct 01, 2018

Hi Brian,

Does Bloqs work with Channel Forms?

I did a test with a Bloqs field, and while it initially appears to render the Bloqs selector, it doesn’t actually let me pull down the dropdown to select a Block.

Given the complexity of Bloqs, I can understand if it might not work with Channel Forms. But on the off chance that it should be compatible and I’m just dealing with an implemenation issue, I thought I’d check before I got into the details.

Thanks for your time.

Cheers,
Matt

#1

BoldMinded (Brian)

Hi, Matt. This really isn’t up to Bloqs. The Channel Forms dev will need to make it compatible if it isn’t already, similar to how they make it Grid compatible.

#2

BoldMinded (Brian)

In some cases devs will add the following to their ft.addon.php file:

public function accepts_content_type($name)
    {
        return true;
    }

Which lazily assumes that the fieldtype will work in all cases, which isn’t always the case. Bloqs requires the fieldtype to specifically opt in (this was a decision made before I owned it, and I support the logic). So it should look more like this:

public function accepts_content_type($name)
    {
        $acceptedTypes = [
            'channel',
            'grid',
            'blocks/1',
            'fluid_field'
        ];

        return in_array($name, $acceptedTypes);
    }

My guess is that if it isn’t working right now, then the code probably looks like the first example.

#3

DSite

Hi Brian,

Thanks for the responses and for thinking this through with me.

My apologies if I didn’t ask very clearly at first… I’m asking about compatibility with the Channel Form functionality that is native within EE: https://docs.expressionengine.com/latest/channel/channel_form/index.html

I’m working on a front-end content entry form, and I’m trying to determine whether Bloqs might be a viable option.

Since it is native functionality, it does not appear that there’s an ft.addon.php that I can edit.

Thanks, Matt

#4

BoldMinded (Brian)

I thought you were referring to https://eeharbor.com/forms

Channel Form is a module tag, so it doesn’t have any direct compatibility with Bloqs, e.g. there is no fieldtype for it to go into a block. I’m not sure what you’re seeking, but they’re two different things and shouldn’t have any bearing on the other. So yes, Channel Form is compatible with Bloqs…. an {exp:channel:form} tag will work just fine inside of a block tag.

#5

BoldMinded (Brian)

it doesn’t actually let me pull down the dropdown to select a Block

Maybe I’m not answering your question correctly b/c I’m confused on what you’re doing. Can you be more descriptive? Provide screenshots or something?

#6

DSite

I’m looking to use Bloqs inside of an {exp:channel:form} tag:

{exp:channel:form channel="channel"}
 {field:bloqs_field}
 <input type="submit" value="Submit">
{/exp:channel:form}

I’m working on getting a test version up so you can view it. I’m not sure if this is helpful or not, but the version I’m working on locally generates the following error in the console when the page loads:

Uncaught TypeError: Cannot read property ‘bindCallbackForField’ of undefined at HTMLDivElement.<a> (cp.js?version=4.0.5:90) at Function.each (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:2) at oe.fn.init.each (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:2) at HTMLDocument.<a> (cp.js?version=4.0.5:67) at l (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:3) at Object.fireWith [as resolveWith] (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:3) at Function.ready (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:3) at HTMLDocument.s (?ACT=4&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog&plugin=nestable,markitup&file=cp/sort_helper,cp/grid,cp/files/picker,underscore,cp/date_picker,cp/date&v=1538404689&use_live_url=y&include_jquery=y:2)
#7

BoldMinded (Brian)

Oh, in that case, no it isn’t supported.

#8

DSite

Okay. Apologies for not being clear enough in my initial question.

I’ll figure out a different approach. Thanks for letting me know. And thanks for all your work on Bloqs. Have a nice day!

#9

BoldMinded (Brian)

It’s something I can look into more, but it probably won’t help you in the near future. I don’t think Blocks (back to EE2) supported Channel Forms, and I think this is only the 2nd time I’ve seen a request for it, so it’s not a highly requested feature. I honestly don’t know how much time it would take to make it work. Normally I’d give it a look very soon, but I’m a bit more focused on the EE conference in a few weeks than adding new add-on features right now.

#10

DSite

I understand. Channel Forms must not be used that much, I guess. That’s kind of the response I got from EllisLab when I asked about the native RTE field not working with Channel Forms.

I hope the conference is a lot of fun. Cheers!

#11

BoldMinded (Brian)

Probably will not work on adding Channel:Forms support to Bloqs. It hasn’t been a highly requested feature and TBH I’m not sure that level of flexibility should be provided outside of the CP to content editors.

Closing ticket.

Login to reply