typo3 - Display field in TCA of pages based on the previous field value -


i achieve field in tca shown or hidden based on previous field value. how can that? can in javascript, possible include javascript in tca?

here user choose value:

$fields = array( 'question_field' => array(     'label' => 'user choose',     'config' => array(         'type' => 'select',         'items' => array(         array('yes','1'),         array('no','0'),         ),     ), ) 

);

if value yes, display second field:

$fields = array( 'second_field' => array(     'label' => 'second question',     'config' => array(         'type' => 'select',         'items' => array(         array('yes','1'),         array('no','0'),         ),     ), ) 

);

so in case, adding line 'displaycond' => 'field:question_field:=:1', final solution looks this:

$fields = array( 'second_field' => array(     'label' => 'second question',     'displaycond' => 'field:question_field:=:1',     'config' => array(         'type' => 'select',         'items' => array(         array('yes','1'),         array('no','0'),         ),     ), ) 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -