How to display content depending on the value of this field here :

{"caption":"Tab Title", "fields": [ {"field":"sectionType","caption":"Секция","inputTVtype":"listbox", "inputOptionValues": "Изображение во весь экран==one-image ||Изображени Слева==image-info ||Изображени Справа==info-image"}

Here is the chunk:

 [[*sectionType:is=`one-image`:then=`<div class="one-image">Work</div>`:else=`<h4>NOT WORK</h4>`]] 

and the conclusion itself:

  [[getImageList? &tvname = `sectionType` &tpl = `@CODE: [[$Section]]` ]] 

I tried to add chunks directly to the migx field as written here - it does not work

    1 answer 1

    1. The json "tabs of the form" you cited are not valid. It should be like this:

     [ { "caption":"Tab Title", "fields": [ { "field":"sectionType", "caption":"Секция", "inputTVtype":"listbox", "inputOptionValues": "Изображение во весь экран==one-image||Изображени Слева==image-info||Изображени Справа==info-image" } ] } ] 

    2. In the &tpl parameter, simply enter the Section.

    3. It is necessary to sectionType in a chunk to a sectionType as to a placeholder.

    Total call getImageList :

     [[getImageList? &tvname = `имя migx поля` &tpl = `Section` ]] 

    Chunk Section :

     [[+sectionType:is=`one-image`:then=`<div class="one-image">Work</div>`:else=`<h4>NOT WORK</h4>`]]