When adding an entry, there is a field called resource id, I want to build a front end event on this field, after the value input or changed, trigger ajax to call an external api to check whether the resource id is existing.

I wonder if there is a way to do that, many thanks.

enter image description here

  • What do you mean by frontend event? A frontend form that updates the value of that field?
    – MoritzLost
    Commented Nov 3, 2021 at 8:16
  • 1
    @MoritzLost such as onChange event. when the value changed, will trigger that event.
    – Thomas
    Commented Nov 3, 2021 at 9:16

1 Answer 1


If you don't want to build a custom plugin to do this you can easily add JavaScript to the control panel using the CP-JS plugin: https://plugins.craftcms.com/cp-js

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.