Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
2.0 kB
4
Indexable
Never
<?= $fields->render_field('repeater_table', [
    'label'      => 'Repeater Tablefdfd',
    'type'       => 'repeater',
    'layout'     => 'table',
    'value'      => $fields->fetch_value('repeater_table'),
    'sub_fields' => [          
      [
        'label'   => 'Text',
        'type'    => 'text',
        'name'    => 'text_name',
      ],[
        'name'    => 'select_tbl',
        'type'    => 'select',
        'value'   => $fields->fetch_value('select_tbl'),
        'label'   => 'Select',
        'choices' => [
          // Simple List
          'text' => 'Test1',
          'number' => 'Test2'
        ],
        'placeholder' => 'Example placeholder',
        'description' => 'Example description',
      ],[
        'name'        => 'custom_text',
        'type'        => 'text',
        'value'       => $fields->fetch_value('custom_text'),
        'placeholder' => 'Example placeholder',
        'description' => 'Example description',
        'condition'   => [
          'action'    => 'show',
          'condition' => [
            'select_tbl' => [ '_eq'  => 'text']

          ]
        ]
      ],[
        'name'        => 'custom_text2',
        'type'        => 'text',
        'value'       => $fields->fetch_value('custom_text2'),
        'placeholder' => 'Example placeholder',
        'description' => 'Example description',
        'condition'   => [
          'action'    => 'show',
          'condition' => [
            'select_tbl' => [ '_eq'  => 'number']
          ]
        ]
      ],
      [
        'name'        => 'custom_text3',
        'type'        => 'text',
        'value'       => $fields->fetch_value('custom_text3'),
        'placeholder' => 'Example placeholder',
        'description' => 'Example description',
        'condition'   => [
          'action'    => 'show',
          'condition' => [
            'select_tbl' => [ '_eq'  => 'number']

          ]
        ]
      ]
    ]
  ]); ?>