CB Code Field provides PHP based autocomplete. You can use whatever PHP code you want, including making an HTTP call to an external service, to handle your autocomplete.
Should I use an autoaction ? or only the code auto complete of the cb field ?
You won't need CB Auto Actions for this.
Do you have examples of code somewhere ?
Simple example as follows. Sorry, can't help you with the rest as we do not provide custom coding assistance. You'll need to code the HTTP call, processing it, etc.. yourself.
Code:
if ( strpos( $value, 'pass' ) !== false ) {
return [ 'Pass_1' => 'Pass 1', 'Pass_2' => 'Pass 2', 'Pass_3' => 'Pass 3', 'Test_4' => 'Pass 4', 'Test_5' => 'Pass 5', 'Test_6' => 'Pass 6' ];
} else {
return [ 'Test_1' => 'Test 1', 'Test_2' => 'Test 2', 'Test_3' => 'Test 3', 'Test_4' => 'Test 4', 'Test_5' => 'Test 5', 'Test_6' => 'Test 6' ];
}
This simple example shows the Pass autocomplete result set if the fields value is "pass" otherwise it shows the Test result set.