Adding a field to the appointment form

Hello there!

We are currently trying to create a module that adds a checkbox in the appoitment form. If this checkbox is checked, this should actually communicate with a dedicated API.

After reading the doc and browsing this forum. Everytime we try to find a way to add a field to an existing form, we land to the “add field to registration form”.

So I do have multiple questions:

  • Is it even possible to create a module which extend an existing form (actually in the “new appointment” form) ?
  • Is there an example somewhere in the documentation ?

ChatGPT response is to create a js which will “add the field on the fly” after page loading. I think this does not make sense, but I had to try… ! :smiley:

Thanks a lot in advance. Gilles

Hi @gillesh2 and welcome to the forum :slight_smile:

What are you trying to achieve with the checkbox from a user-story point of view?

Hello @pauladams,

Actually the checkbox would be something like → Send a “HCW@home invitation link”

If checked, I want to intercept the appointment creation and actually call the HCW@Home rest api, sending it the phone number or the email of the patient to create the invitation in this other system. This system is sending a conference call link to the patient.