0

How can I build a link with callback function like this, but without necessity of href:

$form['link']= [
  '#type' => 'link',
  '#ajax' => [
    'callback' => 'myFunctionCallback',
    'method' => 'replace',
    'effect' => 'none',
    'event' => 'click',
  ],
];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.