Is there a good way to use ajax link in form, to call ajax callback function?

I have form elements and i would like to add link, that would call form creation function with some paramaters, so i can change the form accordingly.

The same as form select, which on change submit's form and sends values ...

thanks guys!

1 Answer 1


There is no '#type' => 'link' form element, and markup does not have #ajax property. So you are down to buttons and images. You can style them to look like a links. Problem is, button will trigger form validation no matter you want it or no.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.