Implementing a new form field with javascript logic

Hi all,

I have got just a small question. Currently I am implementing a new kind of form field.

The new form field consists of a label, a date field, text field and a plus and minus icon. My intention is to add new fields to the form (at runtime) if you click on the plus icon and to remove the fields if you click on the minus icon. I have attached some screenshots. The new form field would be used to add multiple appointments.

The only think I am not sure is where to place the needed javascript functionality to achieve this behavior. I don’t want to place the javascript code inside the html structure.

The next thing is, if it will work with the flowable build in forms, if you try to modify the forms at runtime.

one-appointment

If you click on the plus sign, it should look like this

two-appointments

Many thanks in advance.
Thomas

I also have that same question about adding JAVASCRIPT to the HTML field. Did you ever get a response on that?