How can I add another select multiple or modify the existing to my needs

How can I add another select multiple or modify the existing to my needs

nessinitsnessinits Posts: 86Questions: 27Answers: 0

Hi,

I'm building a dynamic 1-n relation in an editor form. So instead of the checkboxes in the example, I want to use a selectbox where I can select multiple options. I have this working (besides the issue in the backend described in another post).

I need some help how I can implement the select you can see following the link below:
https://silviomoreto.github.io/bootstrap-select/examples/#multiple-select-boxes

Thanks in advance,
nessinits

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,920Questions: 1Answers: 10,152 Site admin
    Answer ✓

    That's a cool library - I've not seen that one before.

    You'd need to create a field type plug-in for Editor, which is basically an interface between Editor and whatever input library you want to use (the Bootstrap select in this case).

    Allan

  • nessinitsnessinits Posts: 86Questions: 27Answers: 0

    Thanks again, Allan. I'll give this a go. ;-)

  • nessinitsnessinits Posts: 86Questions: 27Answers: 0

    Giving it a go, but running to some issues ...

    Where do I include the new field type plug-in? What is the logical place? I have added the field type in a function.js added to the head of my html-page after dataTables.editor.min.js, but the page gives an error ... Unknown field type <typename>

    Cache is empty. :smile:

  • nessinitsnessinits Posts: 86Questions: 27Answers: 0

    Solved it, but got another question while implementing this ...

    Is it possible to extend on the existing select fieldtype? If so, I only have to make a new create function ...

  • nessinitsnessinits Posts: 86Questions: 27Answers: 0

    The only thing I need to alter is conf._input

    Is it possible?

  • allanallan Posts: 61,920Questions: 1Answers: 10,152 Site admin
    Answer ✓

    Currently no - there isn't a way to easily extend the built in field types, since any changes would overwrite the build in functions on your copied plug-in - by which point it would be easier just to write the plug-in.

    Allan

  • nessinitsnessinits Posts: 86Questions: 27Answers: 0

    This is hell! At least for me. I've created the new fieldtype (bselect). It creates a whole new element, but the .css. The result is a display: none; for the select and the .js should create the desired selectbox, however the result in my case is an empty row.

    I think it has to do with z-index, but I've added 10000 to the z-index with no visible result. Could be something else in the .js, but I don't have a clue. Anyone has some hints for me where to search?

  • allanallan Posts: 61,920Questions: 1Answers: 10,152 Site admin
    Answer ✓

    If you give me a link to a page showing the issue I can take a look. If you need me to create a plug-in for Editor that will work with that library, I can do so under the quick support 60 option.

    Allan

This discussion has been closed.