PHP code example of oliverthiele / ot-recordselector

1. Go to this page and download the library: Download oliverthiele/ot-recordselector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oliverthiele / ot-recordselector example snippets


'my_field' => [
    'label' => 'My Record',
    'config' => [
        'type' => 'user',
        'renderType' => 'otRecordSelector',
        'foreign_table' => 'tx_myext_domain_model_record',
        'minitems' => 0,
        'maxitems' => 1,
    ],
],

'contact_address' => [
    'label' => 'Contact',
    'config' => [
        'type' => 'user',
        'renderType' => 'otRecordSelector',
        'foreign_table' => 'tt_address',
        'minitems' => 0,
        'maxitems' => 1,
        'infoFields' => 'uid,city,email',
        'searchFields' => 'first_name,last_name,email,company,title',
        'maxResults' => 30,
        'previewImage' => 'image',
    ],
],