Hello,
I use Migxdb and I have a Listbox (multiple select) in the input tv type. I want to ask if i can to replace the delimiter || with comma when are saving values in the database.
Hello,
I use Migxdb and I have a Listbox (multiple select) in the input tv type. I want to ask if i can to replace the delimiter || with comma when are saving values in the database.
you could. with a aftersave hooksnippet.
But you will need to convert it back to pipes before editing with a aftergetfields hooksnippet
Thanks @bruno17 for your reply. I resolve it. Also i have another problem. I tried to get the name of these ids from the “document_type_id” column using the grid table. Basically when are saving multiple values in the database, in my grid is showing only the first value.
This is my grid column:
For example the second and third row it should have and the other values.
In rendered i use this.renderChunk and in the rendereChunk template i have this:
`[[migxLoopCollection? &packageName=`document_types_categories` &classname=`Document_Type_Category` &tpl=`@CODE:{{+name_gr}}` &where=`{"id:=":"[[+document_type_id]]"}` &outputSeparator=`||`]]`
Any idea for this?
if they are commaseperated now, you could try something like that
&where=`{"id:IN":[ [[+document_type_id]] ]}`
Thanks a lot Bruno. Its working.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.