$this->Form->postLink() doesn't execute action

I have a list of professionals to add to a team, I allow the user to delete that professional from being added to the team when is not saved in the database, for this purpose I have a field in professionals table called selected, When I want to add the professional to the team I modify the selected field with value 1 (this works perfectly), when I want to delete it I modify the same field with value 0, for some reason when I want to delete the professional from the team it doesn’t do anything, it just refreshes the page and the professional remains in the selected list to be added to the team, this is the code for add_professional template:

<?php
/**
 * @var \App\View\AppView $this
 * @var iterable<\App\Model\Entity\Team> $teams
 */
?>
<div class="teams index content">
    <?php 
		$this->Breadcrumbs->add([
			['title' => 'Inicio', 'url' => ['controller' => 'Home', 'action' => 'index'], 'options' => ['class' => 'breadcrumb-item']],
			['title' => 'Equipos', 'url' => ['action' => 'index'], 'options' => ['class' => 'breadcrumb-item']],
			['title' => 'Agregar Profesionales al Equipo', 'options' => ['class' => 'breadcrumb-item']],
		]);
	?>
	<?= $this->Breadcrumbs->render(['class' => 'breadcrumb']) ?>
    <h3><?= __('Agregar Profesionales al Equipo') ?></h3>
	<div class="caja">
		<?php
			$search = ['years','year','months','month','weeks','week','days','day'];
			$replace = ['años','año','meses','mes','semanas','semana','días','día'];
			$edad = $paciente->pacient->birthday->timeAgoInWords(['from'=>$date,'end'=>'1000 years','relativeString' => '%s']);
			$edad = str_replace($search,$replace,$edad);
		?>
		<?= (!empty($paciente->pacient->image_url) ? $this->Html->image($paciente->pacient->image_url, ['class'=>"image_pp"]) : 
			$this->Html->image('avatar.png', ['class'=>"image_pp"]))."<br />".'Paciente: '.h($paciente->pacient->full_name)."<br />Edad: ".$edad ?>
	</div>
	<div class="caja">
		<?= (!empty($coordinador->_matchingData['Professionals']->image_url) ? $this->Html->image($coordinador->_matchingData['Professionals']->image_url, 
			['class'=>"image_pp"]) : $this->Html->image('avatar.png', ['class'=>"image_pp"]))."<br />Coordinador: "
			.h($coordinador->_matchingData['Professionals']->full_name)."<br />Profesión: ".h($coordinador->_matchingData['Professions']->name) ?>
	</div>
    <div class="column-responsive column-80">
        <div class="teams form content">
            <?= $this->Form->create($professionals, ['type' => 'get', 'novalidate' => true]) ?>
            <fieldset>
                <legend><?= __('Datos de Búsqueda') ?></legend>
                <?php
                    echo $this->Form->control('profession_id', ['label' => 'Profesión', 'options' => $professions, 'empty' => '- Seleccione una profesión -']);
                    echo $this->Form->control('last_name', ['label' => 'Apellido']);
                    echo $this->Form->control('name', ['label' => 'Nombre']);
                ?>
            </fieldset>
            <?= $this->Form->button(__('Buscar')) ?>
            <?= $this->Form->end() ?>
        </div>
    </div>
    <div class="table-responsive">
        <table>
            <thead>
                <tr>
                    <th><?= __('Profesional') ?></th>
                    <th><?= __('Foto') ?></th>
                    <th class="actions"><?= __('Agregar los profesionales al equipo') ?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($professionals as $professional): ?>
                <tr>
					<td><?= h($professional->full_name)."<br />".h($professional->profession->name) ?></td>
                    <td>
						<?= !empty($professional->image_url) ? $this->Html->image($professional->image_url, 
							['class'=>"image_pp"]) : $this->Html->image('avatar.png', ['class'=>"image_pp"]) ?>
					</td>
					<td class="actions">
						<?= $this->Form->postLink('Agregar', 
							['controller' => 'Professionals', 'action' => 'updateProfessional', $professional->id, $id, 1], 
							['confirm' => __('¿Desea agregar a {0} al equipo?', $professional->full_name)]) ?>
					</td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
    </div>
    <div class="paginator">
        <ul class="pagination">
            <?= $this->Paginator->first('<< ' . __('first')) ?>
            <?= $this->Paginator->prev('< ' . __('previous')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next') . ' >') ?>
            <?= $this->Paginator->last(__('last') . ' >>') ?>
        </ul>
        <p><?= $this->Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?></p>
    </div>
	<?php if(!empty($count)){ ?>
	<?= $this->Form->create($team) ?>
    <div class="table-responsive">
        <table>
            <thead>
                <tr>
                    <th><?= __('Profesional') ?></th>
                    <th><?= __('Foto') ?></th>
                    <th><?= __('Perfil') ?></th>
                    <th class="actions"><?= __('Eliminar del equipo') ?></th>
                </tr>
            </thead>
            <tbody>
                <?php
					$i = 0;
					foreach ($selected as $value):
				?>
                <tr>
					<td><?= h($value->full_name)."<br />".h($value->profession->name) ?></td>
                    <td>
						<?= !empty($value->image_url) ? $this->Html->image($value->image_url, ['class'=>"image_pp"]) : $this->Html->image('avatar.png', 
							['class'=>"image_pp"]) ?>
					</td>
                    <td>
						<?php
							$default = count($value->professionals_teams)>0 ? $value->professionals_teams[0]->profile_id : '';
							$professionals_teams_id = count($value->professionals_teams)>0 ? $value->professionals_teams[0]->id : 0;
						?>
						<?= $this->Form->control('professionals.'.$i.'._joinData.profile_id', ['label' => false, 'options' => $profiles, 'default' => $default, 'empty' => '- Seleccione un perfil -']) ?>
						<?= $this->Form->hidden('professionals.'.$i.'.id', ['value' => $value->id]) ?>
						<?= $this->Form->hidden('professionals.'.$i.'._joinData.id', ['value' => $professionals_teams_id]) ?>
					</td>
					<td class="actions">
						<?= empty($default) ? $this->Form->postLink('Eliminar profesional', ['controller' => 'Professionals', 
							'action' => 'updateProfessional', $value->id, $id, 0], ['confirm' => __('¿Desea eliminar a {0} del equipo?', $value->full_name)]) : '' ?>
					</td>
				</tr>
				<?php
						$i++;
					endforeach;
				?>
			</tbody>
		</table>
    </div>
	<?= $this->Form->button(__('Guardar')) ?>
	<?= $this->Form->end() ?>
	<?php } ?>
</div>

And this is the code for updateProfessional action:

    public function updateProfessional($id, $team_id, $selected)
    {
		$this->disableAutoRender();
		$professional = $this->Professionals->get($id);
		$professional->selected = $selected;
		$this->Professionals->save($professional);
		return $this->redirect(['controller' => 'Teams', 'action' => 'addProfessional', $team_id]);
	}

How can I solve this issue?

Is it that the link isn’t executing the action, or that the action isn’t updating the record? If the latter, you might check the return value from the save function, and look at what getErrors() returns for possible hints about what’s going wrong.

It doesn’t do anything, maybe it is because the postLink is inside a form?

True. postLink creates a little form for itself, and nesting forms is an HTML no-no, so…

Then, how can I do to delete the professional? I tried converting the postLink in a button and call a jquery ajax function but doesn’t do anything either.